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

Expose test dependencies outside of noxfile.py #601

Closed
brettcannon opened this issue Oct 18, 2022 · 2 comments
Closed

Expose test dependencies outside of noxfile.py #601

brettcannon opened this issue Oct 18, 2022 · 2 comments

Comments

@brettcannon
Copy link
Member

Right now the only way to run the tests outside of running nox -s tests is to manually install what's hard-coded there:

session.install("coverage[toml]>=5.0.0", "pretend", "pytest>=6.2.0", "pip>=9.0.2")

This is problematic if you want to set up your editor for running your tests before you take the next step with nox to run the tests on all installed versions of Python.

We could create a test optional dependency so that we can change:

session.install(".")

to be .[test]. And I'm specifically suggesting test over tests because that's what the core metadata chose as a name.

We could also do this for documentation with a doc extra.

@pradyunsg
Copy link
Member

I won't mind mirroring pip -- and having a docs/requirements.txt and tests/requirements.txt. :)

@brettcannon
Copy link
Member Author

That also works for me if that's the route you want to go.

KOLANICH pushed a commit to KOLANICH-libs/packaging that referenced this issue Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants