Skip to content

Commit 8a7465c

Browse files
committed
update tests
1 parent 2f8ede9 commit 8a7465c

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

tests/test_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
)
2121
DATA = load_data()
2222

23-
# If you run 'pipenv run build', memebers_list.yml gets generated and it will
23+
# If you run 'uv run python -m pyvecorg build', memebers_list.yml gets
24+
# generated and it will
2425
# be tested. If you don't have the file present, the relevant tests will be
2526
# skipped
2627
DATA_BOARD = DATA.get('members_list', {}).get('board', [])

tests/test_python_version.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import os
1+
import re
22
from pathlib import Path
3+
import tomllib
34

45
import yaml
5-
import pipfile
66

77

88
def test_python_version_is_consistent_accross_all_configuration_and_readme():
@@ -18,10 +18,11 @@ def test_python_version_is_consistent_accross_all_configuration_and_readme():
1818
ci_py_name_version = step['name'].split(' ')[-1]
1919
break
2020

21-
pipfile_data = pipfile.load(os.path.join(project_dir, 'Pipfile')).data
22-
pipfile_py_version = pipfile_data['_meta']['requires']['python_version']
21+
pyproject_data = tomllib.loads((project_dir / 'pyproject.toml').read_text())
22+
pyproject_requires_python = pyproject_data['project']['requires-python']
23+
pyproject_py_version = re.search(r'\d+\.\d+', pyproject_requires_python).group(0)
2324

2425
readme = (project_dir / 'README.md').read_text()
2526

26-
assert str(ci_py_version) == str(pipfile_py_version) == ci_py_name_version
27+
assert str(ci_py_version) == str(pyproject_py_version) == ci_py_name_version
2728
assert f'Python {ci_py_version}' in readme

0 commit comments

Comments
 (0)