File tree Expand file tree Collapse file tree 4 files changed +81
-30
lines changed
pyannotate_tools/fixes/tests Expand file tree Collapse file tree 4 files changed +81
-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+ continue-on-error : ${{ matrix.experimental }}
10+ strategy :
11+ fail-fast : false
12+ matrix :
13+ python-version :
14+ - ' 2.7'
15+ - ' 3.5'
16+ - ' 3.6'
17+ - ' 3.7'
18+ - ' 3.8'
19+ - ' 3.9'
20+ experimental :
21+ - false
22+ os : [ubuntu-latest]
23+ include :
24+ # Python 3.4 is not on ubuntu-latest
25+ - python-version : ' 3.4'
26+ os : ubuntu-18.04
27+
28+ # Python 3.10 is currently failing, but this may be OK
29+ - python-version : ' 3.10.0-alpha - 3.10'
30+ experimental : true
31+
32+ steps :
33+ - uses : actions/checkout@v2
34+
35+ - name : Set up Python ${{ matrix.python-version }}
36+ uses : actions/setup-python@v2
37+ with :
38+ python-version : ${{ matrix.python-version }}
39+
40+ - uses : actions/cache@v2
41+ with :
42+ path : ~/.cache/pip
43+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
44+ restore-keys : |
45+ ${{ runner.os }}-pip-
46+
47+ - name : Install dependencies
48+ id : install
49+ run : |
50+ set -x
51+ pip install -r requirements.txt
52+
53+ # install mypy on Python 3.6+
54+ if python -c \
55+ 'import sys; sys.exit(0 if sys.version_info >= (3, 6) else 1)'; then
56+ pip install -U mypy
57+ echo "::set-output name=mypy::true"
58+ fi
59+
60+ - name : Run pytest
61+ run : |
62+ pytest
63+
64+ - name : Run mypy
65+ if : ${{ steps.install.outputs.mypy }}
66+ run : |
67+ mypy pyannotate_*
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66import tempfile
77import unittest
88import 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
1014
1115from lib2to3 .tests .test_fixers import FixerTestCase
1216
Original file line number Diff line number Diff line change 1+ mock ; python_version < '3.3'
12mypy_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'
311setuptools >= 28.8.0
412six >= 1.11.0
513typing >= 3.6.2 ; python_version < '3.5'
You can’t perform that action at this time.
0 commit comments