Skip to content

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 force-pushed the nox-notify-posargs branch from a4a139d to 6636419 Compare June 15, 2021 13:20
@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.

2 participants