File tree Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,6 @@ ignore_missing_imports = True
27
27
[mypy-matplotlib.*]
28
28
ignore_missing_imports = True
29
29
30
- [mypy-packaging.*]
31
- ignore_missing_imports = True
32
-
33
30
[mypy-pandas.*]
34
31
ignore_missing_imports = True
35
32
Original file line number Diff line number Diff line change 1
1
docker
2
- packaging
3
2
plumbum
4
3
pre-commit
5
4
pytest
Original file line number Diff line number Diff line change 2
2
# Distributed under the terms of the Modified BSD License.
3
3
import logging
4
4
5
- from packaging import version # type: ignore
6
-
7
5
from tests .conftest import TrackedContainer
8
6
9
7
LOGGER = logging .getLogger (__name__ )
8
+ EXPECTED_PYTHON_VERSION = "3.10"
10
9
11
10
12
- def test_python_version (
13
- container : TrackedContainer , python_next_version : str = "3.11"
14
- ) -> None :
15
- """Check that python version is lower than the next version"""
16
- LOGGER .info (f"Checking that python version is lower than { python_next_version } " )
11
+ def test_python_version (container : TrackedContainer ) -> None :
12
+ LOGGER .info (
13
+ f"Checking that python major.minor version is { EXPECTED_PYTHON_VERSION } "
14
+ )
17
15
logs = container .run_and_wait (
18
16
timeout = 5 ,
19
17
tty = True ,
20
18
command = ["python" , "--version" ],
21
19
)
22
20
assert logs .startswith ("Python " )
23
- actual_python_version = version . parse ( logs .split ()[1 ])
24
- assert actual_python_version < version . parse (
25
- python_next_version
26
- ), f"Python version shall be lower than { python_next_version } "
21
+ full_version = logs .split ()[1 ]
22
+ major_minor_version = full_version [: full_version . rfind ( "." )]
23
+
24
+ assert major_minor_version == EXPECTED_PYTHON_VERSION
You can’t perform that action at this time.
0 commit comments