Skip to content

Commit

Permalink
Fix tox casing to be consistent with their docs, remove . from pytest (
Browse files Browse the repository at this point in the history
  • Loading branch information
theacodes authored Nov 21, 2018
1 parent e18f93d commit 734d053
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Welcome to Nox
usage
contrib

``nox`` is a command-line tool that automates testing in multiple Python environments, similar to `Tox`_. Unlike Tox, Nox uses a standard Python file for configuration.
``nox`` is a command-line tool that automates testing in multiple Python environments, similar to `tox`_. Unlike tox, Nox uses a standard Python file for configuration.

Install nox via `pip`_::

Expand All @@ -23,8 +23,8 @@ Nox is configured via a ``noxfile.py`` file in your project's directory. Here's

@nox.session
def tests(session):
session.install('py.test')
session.run('py.test')
session.install('pytest')
session.run('pytest')

@nox.session
def lint(session):
Expand All @@ -39,9 +39,9 @@ For each session, Nox will automatically create `virtualenv`_ with the appropria

To learn how to install and use Nox, see the :doc:`tutorial`. For documentation on configuring sessions, see :doc:`config`. For documentation on running ``nox``, see :doc:`usage`.

.. _Tox: https://tox.readthedocs.org
.. _tox: https://tox.readthedocs.org
.. _pip: https://pip.readthedocs.org
.. _py.test: http://pytest.org
.. _pytest: http://pytest.org
.. _virtualenv: https://virtualenv.readthedocs.org

Projects that use Nox
Expand All @@ -65,7 +65,7 @@ Other useful projects

Nox is not the only tool of its kind. If Nox doesn't quite fit your needs or you want to do more research, we recommend looking at these tools:

- `Tox <https://tox.readthedocs.org>`__ is the de-facto standard for managing multiple Python test environments, and is the direct spiritual ancestor to Nox.
- `tox <https://tox.readthedocs.org>`__ is the de-facto standard for managing multiple Python test environments, and is the direct spiritual ancestor to Nox.
- `Invoke <https://www.pyinvoke.org/>`__ is a general-purpose task execution library, similar to Make. Nox can be thought of as if Invoke were tailored specifically to Python testing, so Invoke is a great choice for scripts that need to encompass far more than Nox's specialization.


Expand Down
12 changes: 6 additions & 6 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ Nox automatically creates a separate `virtualenv`_ for every session. You can ch

@nox.session(python='2.7')
def tests(session):
# Install py.test
# Install pytest
session.install('pytest')
# Install everything in requirements-dev.txt
session.install('-r', 'requirements-dev.txt')
# Install the current package in editable mode.
session.install('-e', '.')
# Run py.test. This uses the py.test executable in the virtualenv.
session.run('py.test')
# Run pytest. This uses the pytest executable in the virtualenv.
session.run('pytest')


You can create as many session as you want and sessions can use multiple Python versions, for example::
Expand Down Expand Up @@ -105,7 +105,7 @@ Often it's useful to pass arguments into your test session. Here's a quick examp

@nox.session
def test(session):
session.install('py.test')
session.install('pytest')

if session.posargs:
test_files = session.posargs
Expand Down Expand Up @@ -142,7 +142,7 @@ Session arguments can be parametrized with the :func:`nox.parametrize` decorator
@nox.parametrize('django', ['1.9', '2.0'])
def tests(session, django):
session.install(f'django=={django}')
session.run('py.test')
session.run('pytest')

When you run ``nox``, it will create a two distinct sessions::

Expand All @@ -154,7 +154,7 @@ When you run ``nox``, it will create a two distinct sessions::
nox > pip install --upgrade django==2.0


:func:`nox.parametrize` has an interface and usage intentionally similar to `py.test's parametrize <https://pytest.org/latest/parametrize.html#_pytest.python.Metafunc.parametrize>`_.
:func:`nox.parametrize` has an interface and usage intentionally similar to `pytest's parametrize <https://pytest.org/latest/parametrize.html#_pytest.python.Metafunc.parametrize>`_.

.. autofunction:: nox.parametrize

Expand Down
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Windows

Nox has provisional support for running on Windows. However, depending on your Windows, Python, and virtualenv versions there may be issues. See the following threads for more info:

* `Tox issue 260 <https://github.com/tox-dev/tox/issues/260>`_
* `tox issue 260 <https://github.com/tox-dev/tox/issues/260>`_
* `Python issue 24493 <http://bugs.python.org/issue24493>`_
* `Virtualenv issue 774 <https://github.com/pypa/virtualenv/issues/774>`_

Expand Down

0 comments on commit 734d053

Please sign in to comment.