Skip to content

refactor: rename test/ directories to tests/#77

Merged
royerloic merged 1 commit into
mainfrom
refactor/rename-test-to-tests
Feb 14, 2026
Merged

refactor: rename test/ directories to tests/#77
royerloic merged 1 commit into
mainfrom
refactor/rename-test-to-tests

Conversation

@royerloic

@royerloic royerloic commented Feb 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Rename all 21 test/ directories to tests/ (plural) for Python convention consistency
  • Merge coexisting test/ and tests/ under omega_agent/tools/ into a single tests/ directory
  • Update 3 demo file imports and 1 relative path reference to match new directory names
  • Clean stale .gitignore pytest cache entries and update CLAUDE.md example path
  • Use -m (marker match) instead of -k (keyword match) for pytest markers in CI workflow

Test plan

  • All 274 tests collected, 268 passed, 6 skipped, 0 failures
  • No remaining test/ directories (find src/ -type d -name test returns empty)
  • No stale .test. or /test/ import/path references in codebase
  • All 21 tests/ directories have __init__.py
  • Black formatting clean on edited files
  • pyproject.toml build exclude (**/tests/**) now correctly covers all test directories

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated test framework configuration to use marker-based filtering instead of name-based filtering.
    • Reorganized test directory structure for consistency.
    • Updated internal import paths and documentation references to reflect directory structure changes.
    • Cleaned up cache-related entries in ignore configuration.

Standardize all 21 test directories to use the conventional Python plural
naming `tests/`. This also fixes the sdist build exclude (`**/tests/**` in
pyproject.toml) which previously missed the singular `test/` directories.

Also includes: merge coexisting test/ and tests/ under omega_agent/tools/,
update imports in demo files, fix relative path in vision_test.py, clean
stale .gitignore entries, and use -m instead of -k for pytest markers in CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@royerloic royerloic merged commit b439696 into main Feb 14, 2026
2 checks passed
@royerloic royerloic deleted the refactor/rename-test-to-tests branch February 14, 2026 02:15
@coderabbitai

coderabbitai Bot commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

The PR restructures test directories from singular test to plural tests across multiple demo and test files, updating corresponding import paths and file references. Additionally, pytest test filtering is changed from name-based matching (-k) to marker-based filtering (-m).

Changes

Cohort / File(s) Summary
Test Execution Configuration
.github/workflows/test.yml
Changed pytest selection flag from -k "not integration and not llm and not slow" to -m "not integration and not llm and not slow", switching from name-based to marker-based test filtering.
Ignore Configuration
.gitignore
Removed two pytest cache entries (.pytest_cache/README.md and CACHEDIR.TAG), unignoring previously excluded cache files.
Documentation
CLAUDE.md
Updated test path reference in manual documentation from test/api_key_vault_test.py to tests/api_key_vault_test.py.
Demo Files with Updated Imports
src/napari_chatgpt/omega_agent/tools/napari/delegated_code/demo/cellpose_demo.py, classic_demo.py, stardist_demo.py
Updated import paths from delegated_code.test.*_test to delegated_code.tests.*_test, reflecting directory restructuring.
Test File with Updated Path
src/napari_chatgpt/utils/llm/tests/vision_test.py
Updated image path resolution from ../../openai/test/images/ to ../../openai/tests/images/.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Hoppy refactoring, tests pluralize with glee,
From singular test to tests, now organized we see!
Markers replace names in workflows so grand,
Imports and paths dance across the land!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/rename-test-to-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant