From 0321168b62393a8fa798525b1f41a83a62af11c5 Mon Sep 17 00:00:00 2001 From: sheeki003 <36009418+sheeki03@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:23:25 +0530 Subject: [PATCH] docs: update tests/README.md to reference hatch instead of pip/pytest.ini The project uses hatch for test orchestration. Replace stale requirements-test.txt and pytest.ini references with hatch commands. --- tests/README.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/tests/README.md b/tests/README.md index 6980e163..83860898 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,33 +1,47 @@ # Python Tests -based on pytest. +Tests are managed via [Hatch](https://hatch.pypa.io/) and run with pytest. ## Running Tests -Make sure to install test dependencies: `pip install -r requirements-test.txt`. - ### All Tests ```bash -pytest +hatch test ``` +### Target a specific Python version + +```bash +hatch test --python 3.11 +hatch test --python 3.13 +``` ### Specific Test File + ```bash -pytest tests/test_yaml_parser.py -v +hatch test -- tests/test_yaml_parser.py -v ``` ### Specific Test Class + ```bash -pytest tests/test_yaml_parser.py::TestYamlParser -v +hatch test -- tests/test_yaml_parser.py::TestYamlParser -v ``` ### Specific Test Function + +```bash +hatch test -- tests/test_yaml_parser.py::TestYamlParser::test_yaml_parser_basic_functionality -v +``` + +### Full CI invocation + ```bash -pytest tests/test_yaml_parser.py::TestYamlParser::test_yaml_parser_basic_functionality -v +hatch fmt --linter --check +hatch test --python 3.11 --cover --randomize --parallel --retries 2 --retry-delay 1 ``` ## Test Configuration -See `pytest.ini` in the root directory. \ No newline at end of file +See `[tool.hatch]` and `[tool.coverage]` sections in `pyproject.toml`. \ No newline at end of file