Skip to content

Conversation

@Louciole
Copy link
Member

No description provided.

Copy link
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 refactors the reftests plugin from a monolithic single-file structure into a well-organized modular architecture, improving code maintainability and separation of concerns.

Key Changes:

  • Extracts a 523-line monolithic reftest.py into separate modules with clear responsibilities
  • Separates HTML/CSS/JavaScript from Python code into dedicated static asset files
  • Introduces a WebReport class to encapsulate report generation logic
  • Creates utility functions for file fetching and message retrieval

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
meta/plugins/reftest.py Deleted - replaced by modular structure in reftests/ directory
meta/plugins/__init__.py Updated import to use new reftests module instead of old reftest
meta/plugins/reftests/__init__.py New module initialization file
meta/plugins/reftests/reftest.py Main reftest logic extracted and cleaned up from original file
meta/plugins/reftests/utils.py Utility functions for file/message fetching extracted from main module
meta/plugins/reftests/WebReport.py Web report generation logic encapsulated in dedicated class
meta/plugins/reftests/report.js JavaScript code extracted from inline HTML string to separate file
meta/plugins/reftests/report.css CSS styles extracted from inline HTML string to separate file

Copy link
Member

@sleepy-monax sleepy-monax left a comment

Choose a reason for hiding this comment

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

This is going in a good direction

Comment on lines +93 to +99
def shouldRunSkipped(self) -> bool:
"""Check if skipped tests should be run."""
return self.args.runSkipped

def shouldStopOnFailure(self) -> bool:
"""Check if execution should stop on first failure."""
return self.args.fast
Copy link
Member

Choose a reason for hiding this comment

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

technically these could be marked as @Property, but fine as is

Copy link
Member

Choose a reason for hiding this comment

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

lol pinged a random guy

Copy link
Member Author

Choose a reason for hiding this comment

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

we dont have a setter so it will just add verbosity without use

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.

2 participants