Skip to content

Feat/50 add has tests field - #925

Open
harshita-g wants to merge 7 commits into
ascherj:mainfrom
harshita-g:feat/50-add-has-tests-field
Open

Feat/50 add has tests field#925
harshita-g wants to merge 7 commits into
ascherj:mainfrom
harshita-g:feat/50-add-has-tests-field

Conversation

@harshita-g

Copy link
Copy Markdown

Summary

Adds a has_tests boolean to repository analysis so PathReview can report whether a repository contains automated tests.

Changes

  • Added test detection to RepoAnalyzer
  • Added has_tests to the parser metadata
  • Added Has Tests to the generated repository summary
  • Detects tests/ and test/ directories
  • Detects pytest.ini
  • Detects Python files matching test_*.py
  • Detects __tests__ and spec/
  • Prevents false positives such as test_notes.md
  • Added six unit tests covering positive, negative, and edge-case behavior

Testing

python -m pytest tests/unit/test_repo_analyzer.py -v

Result:

6 passed

Full test suite:

381 passed, 53 failed, 2 warnings

The remaining failures occur in unrelated modules and do not involve RepoAnalyzer or the has_tests change.

Related issue

Closes #50

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.

Add a has_tests boolean to the repo analysis output

1 participant