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

Allow nox test to trigger session test #867

Open
bluss opened this issue Oct 11, 2024 · 0 comments
Open

Allow nox test to trigger session test #867

bluss opened this issue Oct 11, 2024 · 0 comments

Comments

@bluss
Copy link

bluss commented Oct 11, 2024

How would this feature be useful?

It's shorter to type and less stumbling on the keyboard to write nox test than to do nox -s test. This would make nox a rival to other task running solutions (make, poe, just, and so on)

Describe the solution you'd like

It could be opt-in.

Either (easier) nox.options.run_session_by_name = True which means that nox test will look for session(s) called test and run them, or more convoluted would be to let posargs be session.posargs if there are no other arguments, and the user has to set up a default session and dispatch to sessions by name from there themselves.

Describe alternatives you've considered

Typing nox -s test is an alternative. The more punctuation, the less convenient, and - is punctuation.

The user could have a shell alias for alias nos="nox -s"; but this does not help with a "portable" nox setup where you invoke it as ./nox.

nox could be used for its own strengths, environment setup and parametrization, and a dedicated task runner could be used for short invocations, like make, poe, just which all allow make test and so on.

Anything else?

I didn't find any existing features in nox that cover this use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant