Skip to content

fix(tests): enable automation test discovery in pytest#3165

Merged
MarkusNeusinger merged 2 commits intomainfrom
claude/add-automation-tests-pgch7
Jan 3, 2026
Merged

fix(tests): enable automation test discovery in pytest#3165
MarkusNeusinger merged 2 commits intomainfrom
claude/add-automation-tests-pgch7

Conversation

@MarkusNeusinger
Copy link
Copy Markdown
Owner

The pytest configuration was excluding all "scripts" directories from
test discovery, which prevented 108 automation tests in
tests/unit/automation/scripts/ from running in CI.

Changes:

  • Updated norecursedirs to specifically exclude .github/scripts instead
    of all "scripts" directories
  • This allows test discovery in tests/unit/automation/scripts/

Impact:

  • Automation tests now run in CI (+108 tests)
  • Automation coverage increased from 0% to 61%
  • Total test count: 492 → 600

All 108 automation tests pass successfully.

claude added 2 commits January 3, 2026 14:43
The pytest configuration was excluding all "scripts" directories from
test discovery, which prevented 108 automation tests in
tests/unit/automation/scripts/ from running in CI.

Changes:
- Updated norecursedirs to specifically exclude .github/scripts instead
  of all "scripts" directories
- This allows test discovery in tests/unit/automation/scripts/

Impact:
- Automation tests now run in CI (+108 tests)
- Automation coverage increased from 0% to 61%
- Total test count: 492 → 600

All 108 automation tests pass successfully.
Removed redundant entries from norecursedirs that pytest already
handles automatically:
- .github/scripts (doesn't exist + auto-excluded by dotted pattern)
- .git (auto-excluded)
- .venv (auto-excluded)
- __pycache__ (auto-excluded)

Kept only:
- docs (non-dotted directory to skip)
- temp (temporary files directory)

Benefits:
- Cleaner, more maintainable configuration
- Relies on pytest's sensible defaults
- Still excludes all necessary directories

All 619 tests still discovered and running correctly.
Copilot AI review requested due to automatic review settings January 3, 2026 16:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes pytest configuration to enable test discovery in tests/unit/automation/scripts/, which was previously blocked by the overly broad "scripts" exclusion in norecursedirs. The change successfully enables 108 automation tests to run in CI.

Key changes:

  • Removed "scripts", ".git", ".venv", and "pycache" from pytest's norecursedirs configuration
  • This allows pytest to discover tests in tests/unit/automation/scripts/ while still being restricted to the tests/ directory by testpaths

Comment thread pyproject.toml
Comment on lines 152 to 155
norecursedirs = [
"docs",
"scripts",
".git",
".venv",
"__pycache__",
"temp",
]
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description states "Updated norecursedirs to specifically exclude .github/scripts instead of all 'scripts' directories", but the actual change only removes "scripts" from the exclusion list without adding ".github/scripts". Additionally, the .github/scripts directory doesn't currently exist in the codebase.

The current change is correct and achieves the intended goal because testpaths = ["tests"] already restricts pytest to only search within the tests/ directory, so removing "scripts" from norecursedirs won't cause pytest to search in the root scripts/ or automation/scripts/ directories. However, the PR description should be updated to accurately reflect what the change does: it removes "scripts" from the exclusion list to enable test discovery in tests/unit/automation/scripts/.

Copilot uses AI. Check for mistakes.
@MarkusNeusinger MarkusNeusinger merged commit 3151229 into main Jan 3, 2026
13 checks passed
@MarkusNeusinger MarkusNeusinger deleted the claude/add-automation-tests-pgch7 branch January 3, 2026 16:52
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.

3 participants