From f93bc791bf0e788873dbdeaaa4f429b4f12f20e0 Mon Sep 17 00:00:00 2001 From: j-griffith Date: Fri, 29 Sep 2017 15:41:31 -0600 Subject: [PATCH] Switch from ostestr to stestr This change just updates the tox.ini file to call stestr directly instead of going through ostestr. For more background you can read the ML posting: https://goo.gl/TFvcxy So now you won't need `--n` to run single tests, and you can also supply regex directly without even the `--`. For example: `tox -epy27 $regex` Change-Id: I75d4ca19f87fe1930cf54b554b7e232632a4a21c --- doc/source/contributor/testing.rst | 9 ++++++--- tox.ini | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/source/contributor/testing.rst b/doc/source/contributor/testing.rst index 328cbf50cbf..9a6e1a7ac0a 100644 --- a/doc/source/contributor/testing.rst +++ b/doc/source/contributor/testing.rst @@ -103,10 +103,13 @@ Or all tests in the test_volume.py file:: You may also use regular expressions to run any matching tests:: - tox -epy27 -- -r test_volume + tox -epy27 -- test_volume -For more information on these options and how to run tests, please see the -`ostestr documentation `_. +Additionally, when running a single test, or test-file, the `-n` argument is no +longer required, however it may perform faster if included. + +For more information on these options and details about stestr, please see the +`stestr documentation `_. Gotchas ------- diff --git a/tox.ini b/tox.ini index 379df93715c..ca9f183cf0f 100644 --- a/tox.ini +++ b/tox.ini @@ -18,13 +18,13 @@ install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstac deps = -r{toxinidir}/test-requirements.txt -# By default ostestr will set concurrency +# By default stestr will set concurrency # to ncpu, to specify something else use # the concurrency= option. # call ie: 'tox -epy27 -- --concurrency=4' commands = find . -type f -name "*.pyc" -delete - ostestr {posargs} + stestr run '{posargs}' whitelist_externals = bash