Skip to content
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

Simplify Nox session for code coverage #943

Merged
merged 2 commits into from
Jun 15, 2021
Merged

Simplify Nox session for code coverage #943

merged 2 commits into from
Jun 15, 2021

Conversation

cjolowicz
Copy link
Owner

@cjolowicz cjolowicz commented Jun 15, 2021

This PR simplifies the handling of posargs in the Nox session for Coverage.py.

Pass empty posargs when scheduling the coverage sesseion via session.notify. This avoids invoking coverage with options intended for pytest. Previously, our solution relied on inspecting a private attribute of nox.Session.

The posargs parameter for session.notify was introduced in Nox 2021.6.6.

Use the nox.needs_version attribute to declare the dependency on Nox >= 2021.6.6.

Note: This requires nox-poetry 0.8.6 to avoid an error from mypy.

@cjolowicz cjolowicz added the ci Changes to CI configuration files and scripts label Jun 15, 2021
@cjolowicz cjolowicz added this to the 2021.6.15 milestone Jun 15, 2021
@cjolowicz cjolowicz changed the title 👷 [nox] Simplify coverage notification with posargs Simplify Nox session for code coverage Jun 15, 2021
@cjolowicz cjolowicz merged commit 9d5cecc into main Jun 15, 2021
@cjolowicz cjolowicz deleted the nox-notify-posargs branch June 15, 2021 14:14
@cjolowicz cjolowicz mentioned this pull request Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Changes to CI configuration files and scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant