|
|
|
|
@@ -31,7 +31,7 @@ You can then restrict a test run to only run tests marked with ``webtest``::
|
|
|
|
|
|
|
|
|
|
$ pytest -v -m webtest
|
|
|
|
|
=========================== test session starts ============================
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.5
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
|
|
|
|
|
cachedir: .pytest_cache
|
|
|
|
|
rootdir: $REGENDOC_TMPDIR, inifile:
|
|
|
|
|
collecting ... collected 4 items / 3 deselected
|
|
|
|
|
@@ -44,7 +44,7 @@ Or the inverse, running all tests except the webtest ones::
|
|
|
|
|
|
|
|
|
|
$ pytest -v -m "not webtest"
|
|
|
|
|
=========================== test session starts ============================
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.5
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
|
|
|
|
|
cachedir: .pytest_cache
|
|
|
|
|
rootdir: $REGENDOC_TMPDIR, inifile:
|
|
|
|
|
collecting ... collected 4 items / 1 deselected
|
|
|
|
|
@@ -64,7 +64,7 @@ tests based on their module, class, method, or function name::
|
|
|
|
|
|
|
|
|
|
$ pytest -v test_server.py::TestClass::test_method
|
|
|
|
|
=========================== test session starts ============================
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.5
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
|
|
|
|
|
cachedir: .pytest_cache
|
|
|
|
|
rootdir: $REGENDOC_TMPDIR, inifile:
|
|
|
|
|
collecting ... collected 1 item
|
|
|
|
|
@@ -77,7 +77,7 @@ You can also select on the class::
|
|
|
|
|
|
|
|
|
|
$ pytest -v test_server.py::TestClass
|
|
|
|
|
=========================== test session starts ============================
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.5
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
|
|
|
|
|
cachedir: .pytest_cache
|
|
|
|
|
rootdir: $REGENDOC_TMPDIR, inifile:
|
|
|
|
|
collecting ... collected 1 item
|
|
|
|
|
@@ -90,7 +90,7 @@ Or select multiple nodes::
|
|
|
|
|
|
|
|
|
|
$ pytest -v test_server.py::TestClass test_server.py::test_send_http
|
|
|
|
|
=========================== test session starts ============================
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.5
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
|
|
|
|
|
cachedir: .pytest_cache
|
|
|
|
|
rootdir: $REGENDOC_TMPDIR, inifile:
|
|
|
|
|
collecting ... collected 2 items
|
|
|
|
|
@@ -128,7 +128,7 @@ select tests based on their names::
|
|
|
|
|
|
|
|
|
|
$ pytest -v -k http # running with the above defined example module
|
|
|
|
|
=========================== test session starts ============================
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.5
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
|
|
|
|
|
cachedir: .pytest_cache
|
|
|
|
|
rootdir: $REGENDOC_TMPDIR, inifile:
|
|
|
|
|
collecting ... collected 4 items / 3 deselected
|
|
|
|
|
@@ -141,7 +141,7 @@ And you can also run all tests except the ones that match the keyword::
|
|
|
|
|
|
|
|
|
|
$ pytest -k "not send_http" -v
|
|
|
|
|
=========================== test session starts ============================
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.5
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
|
|
|
|
|
cachedir: .pytest_cache
|
|
|
|
|
rootdir: $REGENDOC_TMPDIR, inifile:
|
|
|
|
|
collecting ... collected 4 items / 1 deselected
|
|
|
|
|
@@ -156,7 +156,7 @@ Or to select "http" and "quick" tests::
|
|
|
|
|
|
|
|
|
|
$ pytest -k "http or quick" -v
|
|
|
|
|
=========================== test session starts ============================
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.5
|
|
|
|
|
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
|
|
|
|
|
cachedir: .pytest_cache
|
|
|
|
|
rootdir: $REGENDOC_TMPDIR, inifile:
|
|
|
|
|
collecting ... collected 4 items / 2 deselected
|
|
|
|
|
|