99PYPROJECT_D = vdict .pyproject_d (ROOT )
1010
1111
12- def test__version__tar ():
13- """Version in tar.gz."""
14- expected = PYPROJECT_D ["tool" ]["poetry" ]["version" ]
15- package = PYPROJECT_D ["tool" ]["poetry" ]["name" ].replace ("_" , "-" )
16- regex_tar = fr"{ package } .+/(.+?)\.tar\.gz"
17-
18- # pyproject.toml
19- text = PYPROJECT_D ["tool" ]["poetry" ]["urls" ]["Download URL" ]
20- actual = vre .find1 (regex_tar , text )
12+ def test__python_version ():
13+ """Python version in pyproject.toml."""
14+ actual = PYPROJECT_D ["tool" ]["poetry" ]["dependencies" ]["python" ]
15+ expected = "^3.8"
2116 assert actual == expected
2217
2318
@@ -32,7 +27,6 @@ def test__version__changelog():
3227 assert actual == expected , f"version in { path = } "
3328
3429
35- # noinspection PyTypeChecker
3630def test__version__docs ():
3731 """Version in docs/config.py."""
3832 path = Path .joinpath (ROOT , "docs" , "conf.py" )
@@ -44,6 +38,7 @@ def test__version__docs():
4438 if isinstance (node , ast .Assign ):
4539 for target in node .targets :
4640 if isinstance (target , ast .Name ) and target .id == "release" :
41+ # noinspection PyTypeChecker
4742 actual = ast .literal_eval (node .value )
4843 break
4944
@@ -57,6 +52,6 @@ def test__last_modified_date():
5752 text = path .read_text (encoding = "utf-8" )
5853 regex = r".+\((\d\d\d\d-\d\d-\d\d)\)$"
5954 actual = vre .find1 (regex , text , re .M )
60- files = vpath .get_files (ROOT , ext = " .py" )
55+ files = vpath .get_files (ROOT , pattern = "\ .py$ " )
6156 expected = vdate .last_modified (files )
6257 assert actual == expected , "last modified file"
0 commit comments