Skip to content

Commit 0321168

Browse files
committed
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.
1 parent c08ad8c commit 0321168

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

tests/README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,47 @@
11
# Python Tests
22

3-
based on pytest.
3+
Tests are managed via [Hatch](https://hatch.pypa.io/) and run with pytest.
44

55
## Running Tests
66

7-
Make sure to install test dependencies: `pip install -r requirements-test.txt`.
8-
97
### All Tests
108

119
```bash
12-
pytest
10+
hatch test
1311
```
1412

13+
### Target a specific Python version
14+
15+
```bash
16+
hatch test --python 3.11
17+
hatch test --python 3.13
18+
```
1519

1620
### Specific Test File
21+
1722
```bash
18-
pytest tests/test_yaml_parser.py -v
23+
hatch test -- tests/test_yaml_parser.py -v
1924
```
2025

2126
### Specific Test Class
27+
2228
```bash
23-
pytest tests/test_yaml_parser.py::TestYamlParser -v
29+
hatch test -- tests/test_yaml_parser.py::TestYamlParser -v
2430
```
2531

2632
### Specific Test Function
33+
34+
```bash
35+
hatch test -- tests/test_yaml_parser.py::TestYamlParser::test_yaml_parser_basic_functionality -v
36+
```
37+
38+
### Full CI invocation
39+
2740
```bash
28-
pytest tests/test_yaml_parser.py::TestYamlParser::test_yaml_parser_basic_functionality -v
41+
hatch fmt --linter --check
42+
hatch test --python 3.11 --cover --randomize --parallel --retries 2 --retry-delay 1
2943
```
3044

3145
## Test Configuration
3246

33-
See `pytest.ini` in the root directory.
47+
See `[tool.hatch]` and `[tool.coverage]` sections in `pyproject.toml`.

0 commit comments

Comments
 (0)