-
Notifications
You must be signed in to change notification settings - Fork 1.7k
add support for parallel run #739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reported-by: lekhnath-parajuli-nexyom <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Positive aspects:
- pytest-xdist is already in the dev dependencies (line 55), so parallel execution is supported
- Parallel test execution can significantly speed up test runs
- The PR addresses issue Leverage Pytest-Xdist for Faster and Cleaner Test Runs #736
Issues and Concerns:
- Hardcoded parallelism: Setting --numprocesses 4 hardcodes the parallelism level. This might not be optimal for:
- CI environments with different CPU counts
- Developer machines with fewer cores
- Better to use --numprocesses auto or -n auto to automatically detect CPU count - Warnings suppression: --disable-warnings is problematic:
- The project already carefully manages warnings with filterwarnings
- Suppressing all warnings could hide important deprecation or other warnings
- This conflicts with the existing warning configuration - Logging configuration: The [tool.pytest_env] section is not a standard pytest configuration
- This might not work as intended
- Better to use pytest's built-in logging configuration - Verbosity: -vv might be too verbose for regular test runs
- Could clutter CI output
- Better left to developer preference via command line
Recommendations:
- Change --numprocesses 4 to --numprocesses auto
- Remove --disable-warnings to respect existing warning filters
- Remove -vv from default options
- Remove the [tool.pytest_env] section and use proper pytest logging configuration if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for working on this.
Some concerns highlighted in the comments, please can those be addressed?
Reported-by: lekhnath-parajuli-nexyom <[email protected]>
hey @ihrpr, I've implemented the suggested changes to improve the pytest configuration in pyproject.toml:
Please review these changes and let me know if you'd like any further adjustments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@jerome3o-anthropic @jspahrsummers not able to add you guys as reviewer, please help me out here.
Ticket: #736
Added pytest configuration to enable parallel test execution and disable logging during tests for faster and cleaner test runs.
Motivation and Context
Running tests sequentially was causing longer test suite execution times, slowing down development and CI feedback. Enabling parallel test runs with multiple workers improves overall testing speed and efficiency.
How Has This Been Tested?
Tests were run locally with the new configuration enabled. Verified that:
Breaking Changes
No breaking changes. This update only affects how tests are executed, not the application code or configurations.
Types of changes
Checklist
Additional context
Uses pytest-xdist plugin for parallel test execution with --numprocesses 4
Disables logging during tests to reduce noise and improve test output clarity.