Skip to content

Commit a9b2862

Browse files
authored
test: Plumb posargs through for tox (#194)
Plumbing posargs through would allow devs to run specific tests locally using a tox environment. Updated the documentation to reflect that pattern.
1 parent 5d2e135 commit a9b2862

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

CHANGELOG.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ Added
1414
- Deprecation warning for existing `-i` option for `projects` command.
1515
- Binder build cache step
1616

17-
Updated
18-
~~~~~~~
19-
20-
- Remove notebooks directory as we break it out into a `separate repository <https://github.com/open-strateos/txpy_jupyter_notebooks>`_
21-
2217
Fixed
2318
~~~~~
2419

@@ -33,6 +28,8 @@ Updated
3328
- Added new option "--names" to `projects` CLI command. This is meant as a better
3429
named and more intuitive replacement for the existing `-i` option.
3530
- Returned more explicit error statuses for `projects` and `submit` commands.
31+
- Remove notebooks directory as we break it out into a `separate repository <https://github.com/open-strateos/txpy_jupyter_notebooks>`_
32+
- Plumbed test posargs through to allow local execution of specific test files.
3633

3734
v9.0.0
3835
------

CONTRIBUTING.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ For testing purposes, we write tests in the ``test`` folder in the
7878
also use `tox <https://tox.readthedocs.org/en/latest/>`__ for automating
7979
tests.
8080

81-
The ``tox`` command is run by Jenkins and is currently configured to run
81+
The ``tox`` command is run by CI and is currently configured to run
8282
the main module tests, generate a coverage report and build
8383
documentation.
8484

@@ -92,7 +92,7 @@ the root folder.
9292

9393
If you’re using `pyenv <https://github.com/pyenv/pyenv>`__ to manage
9494
python versions, ensure you have all the tested environments in your
95-
``.python-version`` file. i.e.\ ``pyenv local 3.5.6 3.6.8 3.7.3``
95+
``.python-version`` file. i.e.\ ``pyenv local 3.6.12 3.7.9 3.8.7``
9696

9797
Running Specific Tests
9898
~~~~~~~~~~~~~~~~~~~~~~
@@ -103,6 +103,9 @@ To run just the main module tests, execute ``python setup.py test`` in
103103
the root folder. This is specified by the main ``[testenv]`` flag in
104104
``tox.ini``.
105105

106+
To run a specific test, execute ``python setup.py test -a path/to/test.py``.
107+
Using tox, ``tox -e py36 -- -a path/to/test.py``.
108+
106109
To build the docs locally, execute
107110
``sphinx-build -W -b html -d tmp/doctrees . -d tmp/html`` in the
108111
``docs`` directory. This is specified by the ``[testenv:docs]`` flag in

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
envlist = clean, py36, py37, py38, stats, lint, docs
33

44
[testenv]
5-
commands = python setup.py test
5+
commands = python setup.py test {posargs}
66
deps = .[test, jupyter, analysis]
77

88
[testenv:clean]

0 commit comments

Comments
 (0)