Skip to content

wntrblm/nox

Repository files navigation

logo

Nox

Nox License PyPI GitHub Code Style CI Downloads

Flexible test automation with Python

Overview

noxis 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")

Installation

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

Usage

List all sessions

nox -l/--list

Run all sessions

nox

Run a particular session

nox -s/--sessiontest

Checkout thedocsfor more! 🎉

Contributing

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! 😃