Skip to content

style: align tests/ directory with Google Style Guide (#415)#432

Merged
szy196 merged 10 commits intomainfrom
issue-415-manual-alignment
Apr 14, 2026
Merged

style: align tests/ directory with Google Style Guide (#415)#432
szy196 merged 10 commits intomainfrom
issue-415-manual-alignment

Conversation

@szy196
Copy link
Copy Markdown
Collaborator

@szy196 szy196 commented Apr 3, 2026

Background & Motivation

This PR aligns the tests/ directory with the Google Style Guide and project-specific linting standards. It ensures that the test suite is maintainable, readable, and follows consistent patterns across all modules.

Proposed Changes

  • Linting Configuration: Updated tests/.pylintrc to align with the root config (80-character limit, Google Style rules) while maintaining necessary pytest-specific overrides (redefined-outer-name, unused-argument).
  • Module Documentation: Added module-level docstrings to all files in the tests/ directory.
  • Sequence Comparisons: Refactored explicit empty list/dictionary comparisons to use implicit boolean checks (e.g., if not sequence:) as per the style guide.
  • Line Length Management:
    • Manually wrapped long docstrings, comments, and strings where possible.
    • Added surgical # pylint: disable=line-too-long for 40 instances where wrapping was impractical (primarily long mock data strings).
  • Test Fixes: Fixed tests/test_chromestatus.py which had incorrect mocks for network calls, causing flaky TimeoutError in some environments.
  • formatting: Ran make lint-fix (pyink) to ensure consistent formatting across all modified files.
  • pylint Rating: Achieved a 10.00/10 rating for the tests/ directory with the updated strict configuration.

Related Issues

Resolves #415
Follow-up issue created: #431 (to refactor test_phases.py into smaller modules).

Acceptance Criteria

  • All test files pass pylint with the new configuration.
  • make presubmit runs cleanly for the entire repository.
  • All 393 tests pass with 93% coverage.

This PR description was drafted by Gemini

@szy196 szy196 changed the base branch from main to style-alignment-support-modules-414 April 3, 2026 22:02
@szy196 szy196 force-pushed the issue-415-manual-alignment branch from becaeb2 to a54b6a1 Compare April 3, 2026 22:23
@szy196 szy196 marked this pull request as ready for review April 3, 2026 22:31
@szy196 szy196 marked this pull request as draft April 3, 2026 22:32
@szy196 szy196 force-pushed the issue-415-manual-alignment branch from a54b6a1 to e172434 Compare April 3, 2026 22:33
Base automatically changed from style-alignment-support-modules-414 to main April 9, 2026 18:20
@szy196 szy196 force-pushed the issue-415-manual-alignment branch from ca10c43 to f274043 Compare April 9, 2026 21:18
@szy196 szy196 marked this pull request as ready for review April 9, 2026 22:07
Copy link
Copy Markdown
Collaborator

@DanielRyanSmith DanielRyanSmith left a comment

Choose a reason for hiding this comment

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

One request, but otherwise this is almost ready. 🙂

@szy196 szy196 requested a review from DanielRyanSmith April 13, 2026 22:07
@szy196 szy196 force-pushed the issue-415-manual-alignment branch from 7d9cafd to beae77f Compare April 13, 2026 23:04
@szy196 szy196 requested a review from DanielRyanSmith April 13, 2026 23:43
@szy196 szy196 merged commit 66d7f3f into main Apr 14, 2026
9 checks passed
@szy196 szy196 deleted the issue-415-manual-alignment branch April 14, 2026 16:08
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.

[Epic #26] Manual Alignment: Tests and Final Validation

2 participants