Flexible test automation with Python
-
Documentation:https://nox.readthedocs.io
-
Source Code:https://github.com/wntrblm/nox
nox
is a command-line tool that automates testing in multiple Python environments, similar totox.Unlike tox, Nox uses a standard Python file for configuration:
importnox
@nox.session
deftests(session:nox.Session)->None:
session.install("pytest")
session.run("pytest")
@nox.session
deflint(session:nox.Session)->None:
session.install("flake8")
session.run("flake8","--import-order-style","google")
Nox is designed to be installed globally (not in a project virtual environment), the recommended way of doing this is viapipx,a tool designed to install python CLI programs whilst keeping them separate from your global or system python.
To install Nox withpipx:
pipx install nox
You can also usepipin your global python:
python3 -m pip install nox
You may want to user theuser-siteto avoid messing with your Global python install:
python3 -m pip install --user nox
nox -l/--list
nox
nox -s/--sessiontest
Checkout thedocsfor more! 🎉
Nox is an open source project and welcomes contributions of all kinds, checkout thecontributing guidefor help on how to help us out!
All contributors must follow thecode of conductand be nice to one another! 😃