diff --git a/pyproject.toml b/pyproject.toml index 39060b0..258d044 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,8 @@ dependencies = [ "pip-tools", "pytest", "mkdocs-material", - "hatch" + "hatch", + "tomli" ] [[project.authors]] diff --git a/pyrgo/command/test.py b/pyrgo/command/test.py index 299693d..089d18c 100644 --- a/pyrgo/command/test.py +++ b/pyrgo/command/test.py @@ -7,7 +7,6 @@ from pyrgo.utilities.command import PythonExecCommand, inform_and_run_program from pyrgo.utilities.project import ( - extract_pytest_relevant_paths, list_pytest_markers, read_pyproject, ) @@ -45,10 +44,7 @@ def test( marker: Optional[str], ) -> None: """Execute tests using `pytest`.""" - cwd = pathlib.Path().cwd() - content = read_pyproject(cwd=cwd) - - args_to_add = extract_pytest_relevant_paths(content=content) + args_to_add: List[str] = [] if not no_strict_markers: args_to_add.append("--strict-markers") diff --git a/pyrgo/utilities/project.py b/pyrgo/utilities/project.py index 2a54e37..85bd4ab 100644 --- a/pyrgo/utilities/project.py +++ b/pyrgo/utilities/project.py @@ -1,12 +1,10 @@ """project utilities.""" import pathlib -from functools import cache from typing import Any, Dict, List import tomli -@cache def read_pyproject(cwd: pathlib.Path) -> Dict[str, Any]: """Read `pyproject.toml`.""" path_to_pyproject = cwd.joinpath("pyproject.toml") diff --git a/requirements/core.lock b/requirements/core.lock index 7d3f1c9..6075e81 100644 --- a/requirements/core.lock +++ b/requirements/core.lock @@ -170,6 +170,7 @@ tomli==2.0.1 # hatchling # mypy # pyproject-hooks + # pyrgo (pyproject.toml) # pytest tomli-w==1.0.0 # via hatch diff --git a/requirements/dev.lock b/requirements/dev.lock index 35293e7..ce2d12b 100644 --- a/requirements/dev.lock +++ b/requirements/dev.lock @@ -170,6 +170,7 @@ tomli==2.0.1 # hatchling # mypy # pyproject-hooks + # pyrgo (pyproject.toml) # pytest tomli-w==1.0.0 # via hatch