-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
Using posargs to pass tests as arguments to tests
nox session
#4334
Conversation
Signed-off-by: Pradyot Ranjan <[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.
Thanks, @prady0t! Could you please document this in the Contributing guide? Edit: also, does this work with a specific test class/case as well, besides a test file?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4334 +/- ##
========================================
Coverage 99.46% 99.46%
========================================
Files 289 289
Lines 22146 22146
========================================
Hits 22027 22027
Misses 119 119 ☔ View full report in Codecov by Sentry. |
Yes, it will work with a specific test class/case as well. You can try : |
I ran the command, and I think this is a nice improvement for running a selected piece of tests in an isolated virtual environment for local development. That said, it brings a lot of bottlenecks – installing and building PyBaMM is now taking longer than running a bunch of tests :) This might be a good motivator for switching to |
I had an eye on that issue and wanted to work on it. Maybe we can also add it to the stretch goal? |
I remember @santacodes was working on it some time ago – if he agrees with your proposition, feel free to take over. :) That said, you both can collaborate and work on it together as well if you would like to, either by distributing tasks, preserving co-authorship on commits, or both. |
Signed-off-by: Pradyot Ranjan <[email protected]>
…o modifying-nox Merging
That would be nice! |
Sure, I would love to work with @prady0t, I already had some of the work done on one of my feature branches and then the work was stalled for some time if I remember correctly, I just have to resolve the merge conflicts, and open up a PR. |
I've added the documentation. I think this is ready to be merged. |
Yes, seems to be random |
…mm-team#4334) * Using posargs to pass tests as arguments to nox session Signed-off-by: Pradyot Ranjan <[email protected]> * style: pre-commit fixes * Adding info to docs Signed-off-by: Pradyot Ranjan <[email protected]> * style: pre-commit fixes --------- Signed-off-by: Pradyot Ranjan <[email protected]> Co-authored-by: Pradyot Ranjan <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Arjun Verma <[email protected]>
Description
We can now pass specific test names to
tests
session. Example :nox -s test -- tests/unit/test_discretisations/test_discretisation.py
now only runs tests intest_discretisation.py