Skip to content

Add test placement guidance to usethis-python-test skill#1898

Merged
nathanjmcdougall merged 2 commits into
mainfrom
copilot/fix-test-file-structure
Apr 9, 2026
Merged

Add test placement guidance to usethis-python-test skill#1898
nathanjmcdougall merged 2 commits into
mainfrom
copilot/fix-test-file-structure

Conversation

Copilot AI commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Tests for class methods were being placed in the test file for utilities they use internally, rather than in the test file for the class where the methods are defined — breaking the structural correspondence between source and test files.

Changes

  • usethis-python-test skill (v1.3 → v1.4): Adds a new "Test file placement mirrors source file structure" subsection under "Test class organization", establishing that tests for a method on SomeClass in some_module.py belong under TestSomeClass in test_some_module.py, regardless of which internal utilities the method delegates to.

… v1.4)

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/c190dab3-7bae-474b-8b73-f1f67ec0ea5b

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix test file structure for KeyValueFileManager methods Add test placement guidance to usethis-python-test skill Apr 8, 2026
Copilot AI requested a review from nathanjmcdougall April 8, 2026 11:44
@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review April 8, 2026 19:48
@nathanjmcdougall nathanjmcdougall merged commit 5e08de1 into main Apr 9, 2026
1 check passed
@nathanjmcdougall nathanjmcdougall deleted the copilot/fix-test-file-structure branch April 9, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lesson: Tests for a class method should live in the test file for that class

2 participants