Skip to content

Commit a2ca9a8

Browse files
authored
Merge pull request #165 from dmtucker/constrain
Ensure expected versions are installed while testing
2 parents e417fef + 291da1f commit a2ca9a8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
import mypy.version
2+
13
pytest_plugins = "pytester"
4+
5+
6+
def pytest_report_header():
7+
return f"mypy: {mypy.version.__version__}"

tox.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# For more information about tox, see https://tox.readthedocs.io/en/latest/
22
[tox]
3-
minversion = 3.20
3+
minversion = 4.4
44
isolated_build = true
55
envlist =
66
py37-pytest{4.6, 5.0, 5.x, 6.0, 6.x, 7.0, 7.x}-mypy{0.50, 0.x, 1.0, 1.x}
@@ -22,6 +22,7 @@ python =
2222
3.12: py312-pytest{6.2, 6.x, 7.0, 7.x, 8.0, 8.x}-mypy{0.90, 0.x, 1.0, 1.x}
2323

2424
[testenv]
25+
constrain_package_deps = true
2526
deps =
2627
pytest4.6: pytest ~= 4.6.0
2728
pytest5.0: pytest ~= 5.0.0
@@ -54,6 +55,7 @@ testpaths = tests
5455

5556
[testenv:publish]
5657
passenv = TWINE_*
58+
constrain_package_deps = false
5759
deps =
5860
build[virtualenv] ~= 0.9.0
5961
twine ~= 4.0.0

0 commit comments

Comments
 (0)