Observed Behavior
tests/test_config.py diverges from the project's unit testing standards defined in .aiassistant/rules/tests.md:
- "Write one test case per class or function being tested":
ConfigModelTestCase combines tests for RepositoryConfig, GlobalConfig, and ConfigManager. ConfigIOTestCase combines tests for ConfigIO, JsonConfigIO, and TomlConfigIO.
- "Name all test cases using the pascal case name of the class or function being tested, with the suffix TestCase": Classes like
ConfigModelTestCase and ConfigIOTestCase do not correspond to the classes under test.
- Method naming rules (
test_<method_name>__<behavior>): Many methods use ad-hoc names such as test_protocol_has_required_methods, test_config_io__raises_for_invalid_extension, etc.
Expected Behavior
tests/test_config.py should be organized with one TestCase per class under test (JsonConfigIOTestCase, TomlConfigIOTestCase, RepositoryConfigTestCase, GlobalConfigTestCase, ConfigManagerTestCase), with methods following the test_<method>__<behavior> convention.
Steps to Reproduce
- Compare
tests/test_config.py against .aiassistant/rules/tests.md.
- Observe multiple classes tested inside
ConfigModelTestCase (lines 137-197) and ConfigIOTestCase (lines 104-135).
Minimal Reproduction Environment / Conditions
- Version / Branch / Commit:
release-v0.5.x@6d07c0c
- Component:
tests/test_config.py
Deliverables & Testing Requirements
- Refactor
tests/test_config.py into distinct test case classes:
JsonConfigIOTestCase
TomlConfigIOTestCase
RepositoryConfigTestCase
GlobalConfigTestCase
ConfigManagerTestCase
- Update method names to
test_<method_name>__<behavior> pattern.
- Verify full test suite passes without regressions (
uv run pytest).
Technical Pointers & Root Cause Clues
- Suspected Components:
tests/test_config.py, .aiassistant/rules/tests.md
- Related Commits:
f96f3fb (Add support for TOML config and migrate to that)
Notes & Edge Cases
- Preserves all existing assertions while aligning structure with style guide.
Metadata
Severity / Priority: P2 (Medium)
Area: testing, styleguide
AI Usage
Drafted with Gemini following the DEEP framework based on code review findings against release-v0.5.x. Reproduction conditions and code references were verified in the codebase.
Observed Behavior
tests/test_config.pydiverges from the project's unit testing standards defined in.aiassistant/rules/tests.md:ConfigModelTestCasecombines tests forRepositoryConfig,GlobalConfig, andConfigManager.ConfigIOTestCasecombines tests forConfigIO,JsonConfigIO, andTomlConfigIO.ConfigModelTestCaseandConfigIOTestCasedo not correspond to the classes under test.test_<method_name>__<behavior>): Many methods use ad-hoc names such astest_protocol_has_required_methods,test_config_io__raises_for_invalid_extension, etc.Expected Behavior
tests/test_config.pyshould be organized with oneTestCaseper class under test (JsonConfigIOTestCase,TomlConfigIOTestCase,RepositoryConfigTestCase,GlobalConfigTestCase,ConfigManagerTestCase), with methods following thetest_<method>__<behavior>convention.Steps to Reproduce
tests/test_config.pyagainst.aiassistant/rules/tests.md.ConfigModelTestCase(lines 137-197) andConfigIOTestCase(lines 104-135).Minimal Reproduction Environment / Conditions
release-v0.5.x@6d07c0ctests/test_config.pyDeliverables & Testing Requirements
tests/test_config.pyinto distinct test case classes:JsonConfigIOTestCaseTomlConfigIOTestCaseRepositoryConfigTestCaseGlobalConfigTestCaseConfigManagerTestCasetest_<method_name>__<behavior>pattern.uv run pytest).Technical Pointers & Root Cause Clues
tests/test_config.py,.aiassistant/rules/tests.mdf96f3fb(Add support for TOML config and migrate to that)Notes & Edge Cases
Metadata
Severity / Priority: P2 (Medium)
Area:
testing,styleguideAI Usage
Drafted with Gemini following the DEEP framework based on code review findings against
release-v0.5.x. Reproduction conditions and code references were verified in the codebase.