Skip to content

Commit fac7464

Browse files
Mention uv run pytest tests\test_suite.py::test_skeleton_matches for validating test-src dir correspondence (#1387)
1 parent bae8f92 commit fac7464

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • .agents/skills/usethis-python-module-layout-modify

.agents/skills/usethis-python-module-layout-modify/SKILL.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Modify the Python module layout (create, move, rename, or delete mo
44
compatibility: usethis, Python, pytest
55
license: MIT
66
metadata:
7-
version: "1.2"
7+
version: "1.3
88
---
99
1010
# Modifying the module layout for Python projects
@@ -14,14 +14,16 @@ metadata:
1414
When creating, moving, renaming, or deleting Python modules in the `src` directory:
1515
1616
1. Make the necessary changes to the module layout in the `src` directory.
17-
2. Update the test directory structure to match any changes in the `src` directory.
17+
2. Update the test directory structure to match any changes in the `src` directory, validate with `uv run pytest tests\test_suite.py::test_skeleton_matches`.
1818
3. Check for any broken references (e.g. import statements) and fix them.
1919
4. Update the Import Linter contracts using the `usethis-qa-import-linter` skill.
2020
2121
## Updating the test directory structure
2222
2323
Any changes in the `src` directory should be matched in the `tests` directory. For example, if we had `src/usethis/_a.py` and were splitting it into new submodules `usethis/_a/b.py` and `usethis/_a/c.py`, we would also need to split `tests/test_a.py` into `tests/_a_/test_b.py` and `tests/_a_/test_c.py`.
2424
25+
You should validate the changes are successful via the command `uv run pytest tests\test_suite.py::test_skeleton_matches`.
26+
2527
## Strategy for broken references
2628
2729
Whenever:

0 commit comments

Comments
 (0)