File tree 4 files changed +75
-30
lines changed
pyannotate_tools/fixes/tests
4 files changed +75
-30
lines changed Original file line number Diff line number Diff line change
1
+ name : Test
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ build :
7
+ name : Python ${{ matrix.python-version }}
8
+ runs-on : ${{ matrix.os }}
9
+ strategy :
10
+ fail-fast : false
11
+ matrix :
12
+ python-version :
13
+ - ' 2.7'
14
+ - ' 3.5'
15
+ - ' 3.6'
16
+ - ' 3.7'
17
+ - ' 3.8'
18
+ - ' 3.9'
19
+ - ' 3.10.0-alpha - 3.10'
20
+ os : [ubuntu-latest]
21
+ include :
22
+ # is not on ubuntu-latest
23
+ - python-version : ' 3.4'
24
+ os : ubuntu-18.04
25
+
26
+ steps :
27
+ - uses : actions/checkout@v2
28
+
29
+ - name : Set up Python ${{ matrix.python-version }}
30
+ uses : actions/setup-python@v2
31
+ with :
32
+ python-version : ${{ matrix.python-version }}
33
+
34
+ - uses : actions/cache@v2
35
+ with :
36
+ path : ~/.cache/pip
37
+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
38
+ restore-keys : |
39
+ ${{ runner.os }}-pip-
40
+
41
+ - name : Install dependencies
42
+ id : install
43
+ run : |
44
+ set -x
45
+ pip install -r requirements.txt
46
+
47
+ # install mypy on Python 3.6+
48
+ if python -c \
49
+ 'import sys; sys.exit(0 if sys.version_info >= (3, 6) else 1)'; then
50
+ pip install -U mypy
51
+ echo "::set-output name=mypy::true"
52
+ fi
53
+
54
+ - name : Run pytest
55
+ run : |
56
+ pytest
57
+
58
+ - name : Run mypy
59
+ if : ${{ steps.install.outputs.mypy }}
60
+ run : |
61
+ mypy pyannotate_*
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 6
6
import tempfile
7
7
import unittest
8
8
import sys
9
- from mock import patch
9
+
10
+ try :
11
+ from unittest .mock import patch
12
+ except ImportError :
13
+ from mock import patch # type: ignore
10
14
11
15
from lib2to3 .tests .test_fixers import FixerTestCase
12
16
Original file line number Diff line number Diff line change
1
+ mock ; python_version < '3.3'
1
2
mypy_extensions >= 0.3.0
2
- pytest >= 3.3.0
3
+ pytest >= 3.3.0 ; python_version > '3.5'
4
+ # pytest >5.3.0 uses typing.Type from Python 3.5.2
5
+ pytest >= 3.3.0 ,<= 5.3.0 ; python_version < = '3.5'
6
+ # importlib-metadata is needed for Python 3.5+, but pip does not seem to be
7
+ # pinning it to a correct version for Python 3.5 (possibly because it's a
8
+ # transitive dependency).
9
+ # Python 3.5 support was dropped in importlib-metadata 3.0.0
10
+ importlib-metadata >= 0.12 ,< 3.0.0 ; python_version == '3.5'
3
11
setuptools >= 28.8.0
4
12
six >= 1.11.0
5
13
typing >= 3.6.2 ; python_version < '3.5'
You can’t perform that action at this time.
0 commit comments