-
Notifications
You must be signed in to change notification settings - Fork 145
chore: fix argument to main test function #1338
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
base: main
Are you sure you want to change the base?
Conversation
When trying to run tests with `hatch run test path/to/test.py::test_fo`, hatch keeps the first `tests/` argument, which ends up including all of the tests anyway. Signed-off-by: JP-Ellis <josh@jpellis.me>
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.
Pull Request Overview
This PR fixes the test command configuration to properly handle user-specified test paths. The change allows users to run specific tests with hatch run test path/to/test.py::test_name without inadvertently running all tests due to the hardcoded tests/ argument being retained.
Key Changes:
- Modified the pytest command to use
{args:tests/}instead of hardcodedtests/ {args}, makingtests/a default value that gets replaced when arguments are provided
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
❌ 8 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
📝 Summary
When trying to run tests with
hatch run test path/to/test.py::test_fo, hatch keeps the firsttests/argument, which ends up including all of the tests anyway.🚨 Breaking Changes🔥 Motivation
🔨 Test Plan
🔗 Related issues/PRs