Skip to content

Commit 3dc75df

Browse files
authored
Merge pull request #95 from dmtucker/pytest
Drop support for pytest<4.6
2 parents a95618c + c84025f commit 3dc75df

File tree

3 files changed

+16
-92
lines changed

3 files changed

+16
-92
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def read(fname):
3434
install_requires=[
3535
"attrs>=19.0",
3636
"filelock>=3.0",
37-
"pytest>=3.5",
37+
"pytest>=4.6",
3838
'mypy>=0.500; python_version<"3.8"',
3939
'mypy>=0.700; python_version>="3.8" and python_version<"3.9"',
4040
'mypy>=0.780; python_version>="3.9"',

src/pytest_mypy.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ def pytest_configure_node(self, node): # xdist hook
8787

8888
config.pluginmanager.register(_MypyXdistPlugin())
8989

90-
# pytest_terminal_summary cannot accept config before pytest 4.2.
91-
global _pytest_terminal_summary_config
92-
_pytest_terminal_summary_config = config
93-
9490
config.addinivalue_line(
9591
"markers",
9692
"{marker}: mark tests to be checked by mypy.".format(marker=MypyItem.MARKER),
@@ -292,9 +288,8 @@ class MypyError(Exception):
292288
"""
293289

294290

295-
def pytest_terminal_summary(terminalreporter):
291+
def pytest_terminal_summary(terminalreporter, config):
296292
"""Report stderr and unrecognized lines from stdout."""
297-
config = _pytest_terminal_summary_config
298293
try:
299294
with open(config._mypy_results_path, mode="r") as results_f:
300295
results = MypyResults.load(results_f)

tox.ini

Lines changed: 14 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -3,103 +3,29 @@
33
minversion = 3.20
44
isolated_build = true
55
envlist =
6-
py35-pytest{3.5, 3.x, 4.0, 4.x, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
7-
py36-pytest{3.5, 3.x, 4.0, 4.x, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
8-
py37-pytest{3.5, 3.x, 4.0, 4.x, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
9-
py38-pytest{3.5, 3.x, 4.0, 4.x, 5.0, 5.x, 6.0, 6.x}-mypy{0.71, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
10-
py39-pytest{3.5, 3.x, 4.0, 4.x, 5.0, 5.x, 6.0, 6.x}-mypy{0.78, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
6+
py35-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
7+
py36-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
8+
py37-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
9+
py38-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.71, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
10+
py39-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.78, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
1111
publish
1212
static
1313

1414
[gh-actions]
1515
python =
16-
3.5: py35-pytest{3.5, 3.x, 4.0, 4.x, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
17-
3.6: py36-pytest{3.5, 3.x, 4.0, 4.x, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
18-
3.7: py37-pytest{3.5, 3.x, 4.0, 4.x, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
19-
3.8: py38-pytest{3.5, 3.x, 4.0, 4.x, 5.0, 5.x, 6.0, 6.x}-mypy{0.71, 0.7x, 0.80, 0.8x, 0.90, 0.9x}, publish, static
20-
3.9: py39-pytest{3.5, 3.x, 4.0, 4.x, 5.0, 5.x, 6.0, 6.x}-mypy{0.78, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
16+
3.5: py35-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
17+
3.6: py36-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
18+
3.7: py37-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.50, 0.5x, 0.60, 0.6x, 0.70, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
19+
3.8: py38-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.71, 0.7x, 0.80, 0.8x, 0.90, 0.9x}, publish, static
20+
3.9: py39-pytest{4.6, 5.0, 5.x, 6.0, 6.x}-mypy{0.78, 0.7x, 0.80, 0.8x, 0.90, 0.9x}
2121

2222
[testenv]
2323
deps =
24-
pytest3.5: pytest ~= 3.5.0
25-
pytest3.5: pytest-cov ~= 2.5.1
26-
pytest3.5: pytest-randomly ~= 2.1.1
27-
pytest3.5: pytest-xdist < 1.19.0
28-
pytest3.6: pytest ~= 3.6.0
29-
pytest3.6: pytest-cov ~= 2.5.1
30-
pytest3.6: pytest-randomly ~= 2.1.1
31-
pytest3.6: pytest-xdist < 1.28.0
32-
pytest3.7: pytest ~= 3.7.0
33-
pytest3.7: pytest-cov ~= 2.5.1
34-
pytest3.7: pytest-randomly ~= 2.1.1
35-
pytest3.7: pytest-xdist < 1.28.0
36-
pytest3.8: pytest ~= 3.8.0
37-
pytest3.8: pytest-cov ~= 2.5.1
38-
pytest3.8: pytest-randomly ~= 2.1.1
39-
pytest3.8: pytest-xdist < 1.28.0
40-
pytest3.9: pytest ~= 3.9.0
41-
pytest3.9: pytest-cov ~= 2.5.1
42-
pytest3.9: pytest-randomly ~= 2.1.1
43-
pytest3.9: pytest-xdist < 1.28.0
44-
pytest3.10: pytest ~= 3.10.0
45-
pytest3.10: pytest-cov ~= 2.5.1
46-
pytest3.10: pytest-randomly ~= 2.1.1
47-
pytest3.10: pytest-xdist < 1.28.0
48-
pytest3.x: pytest ~= 3.5
49-
pytest3.x: pytest-cov ~= 2.5.1
50-
pytest3.x: pytest-randomly ~= 2.1.1
51-
pytest3.x: pytest-xdist < 1.28.0
52-
pytest4.0: attrs < 19.2.0 # https://github.com/pytest-dev/pytest/issues/5900
53-
pytest4.0: pytest ~= 4.0.0
54-
pytest4.0: pytest-cov ~= 2.5.1
55-
pytest4.0: pytest-randomly ~= 2.1.1
56-
pytest4.0: pytest-xdist < 1.28.0
57-
pytest4.1: attrs < 19.2.0 # https://github.com/pytest-dev/pytest/issues/5900
58-
pytest4.1: pytest ~= 4.1.0
59-
pytest4.1: pytest-cov ~= 2.5.1
60-
pytest4.1: pytest-randomly ~= 2.1.1
61-
pytest4.1: pytest-xdist < 1.28.0
62-
pytest4.2: attrs < 19.2.0 # https://github.com/pytest-dev/pytest/issues/5900
63-
pytest4.2: pytest-cov ~= 2.5.1
64-
pytest4.2: pytest-randomly ~= 2.1.1
65-
pytest4.2: pytest ~= 4.2.0
66-
pytest4.2: pytest-xdist < 1.28.0
67-
pytest4.3: pytest ~= 4.3.0
68-
pytest4.3: pytest-cov ~= 2.5.1
69-
pytest4.3: pytest-randomly ~= 2.1.1
70-
pytest4.3: pytest-xdist < 1.28.0
71-
pytest4.4: pytest ~= 4.4.0
72-
pytest4.4: pytest-cov ~= 2.5.1
73-
pytest4.4: pytest-randomly ~= 2.1.1
74-
pytest4.4: pytest-xdist ~= 1.0, < 1.30.0 # https://github.com/pytest-dev/pytest-xdist/issues/472
75-
pytest4.5: pytest ~= 4.5.0
76-
pytest4.5: pytest-cov ~= 2.5.1
77-
pytest4.5: pytest-randomly ~= 2.1.1
78-
pytest4.5: pytest-xdist ~= 1.0, < 1.30.0 # https://github.com/pytest-dev/pytest-xdist/issues/472
7924
pytest4.6: pytest ~= 4.6.0
80-
pytest4.6: pytest-cov ~= 2.5.1
81-
pytest4.6: pytest-randomly ~= 2.1.1
82-
pytest4.6: pytest-xdist ~= 1.0, < 1.30.0 # https://github.com/pytest-dev/pytest-xdist/issues/472
83-
pytest4.x: pytest ~= 4.0
84-
pytest4.x: pytest-cov ~= 2.5.1
85-
pytest4.x: pytest-randomly ~= 2.1.1
86-
pytest4.x: pytest-xdist ~= 1.0, < 1.30.0 # https://github.com/pytest-dev/pytest-xdist/issues/472
8725
pytest5.0: pytest ~= 5.0.0
88-
pytest5.0: pytest-cov ~= 2.5.1
89-
pytest5.0: pytest-randomly ~= 2.1.1
90-
pytest5.0: pytest-xdist ~= 1.0, < 1.30.0 # https://github.com/pytest-dev/pytest-xdist/issues/472
9126
pytest5.x: pytest ~= 5.0
92-
pytest5.x: pytest-cov ~= 2.5.1
93-
pytest5.x: pytest-randomly ~= 2.1.1
94-
pytest5.x: pytest-xdist ~= 1.0, < 1.30.0 # https://github.com/pytest-dev/pytest-xdist/issues/472
9527
pytest6.0: pytest ~= 6.0.0
96-
pytest6.0: pytest-cov ~= 2.10
97-
pytest6.0: pytest-randomly ~= 3.4
98-
pytest6.0: pytest-xdist ~= 2.0
9928
pytest6.x: pytest ~= 6.0
100-
pytest6.x: pytest-cov ~= 2.10
101-
pytest6.x: pytest-randomly ~= 3.4
102-
pytest6.x: pytest-xdist ~= 2.0
10329
mypy0.50: mypy >= 0.500, < 0.510
10430
mypy0.51: mypy >= 0.510, < 0.520
10531
mypy0.52: mypy >= 0.520, < 0.530
@@ -138,8 +64,11 @@ deps =
13864
mypy0.9x: mypy >= 0.900, <= 0.999
13965

14066
pexpect ~= 4.8.0
67+
pytest-cov ~= 2.10
68+
pytest-randomly ~= 3.4
69+
pytest-xdist ~= 1.34
14170

142-
commands = py.test -p no:mypy {posargs:--cov pytest_mypy --cov-fail-under 100 --cov-report term-missing -n auto}
71+
commands = pytest -p no:mypy {posargs:--cov pytest_mypy --cov-fail-under 100 --cov-report term-missing -n auto}
14372

14473
[pytest]
14574
testpaths = tests

0 commit comments

Comments
 (0)