remove boxed from example -n1 is sufficient and quicker to run
This commit is contained in:
committed by
Ronny Pfannschmidt
parent
ad3e45590f
commit
3f96e1b97f
@@ -14,19 +14,19 @@ to run each test in a controlled subprocess. Here is a basic example::
|
|||||||
@pytest.mark.parametrize("arg", range(50))
|
@pytest.mark.parametrize("arg", range(50))
|
||||||
def test_func(arg):
|
def test_func(arg):
|
||||||
time.sleep(0.05) # each tests takes a while
|
time.sleep(0.05) # each tests takes a while
|
||||||
if arg % 19 == 0:
|
if arg % 19 == 0:
|
||||||
os.kill(os.getpid(), 15)
|
os.kill(os.getpid(), 15)
|
||||||
|
|
||||||
If you run this with::
|
If you run this with::
|
||||||
|
|
||||||
$ py.test --boxed
|
$ py.test -n1
|
||||||
=========================== test session starts ============================
|
=========================== test session starts ============================
|
||||||
platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev8
|
platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev8
|
||||||
plugins: xdist, bugzilla, cache, oejskit, cli, pep8, cov
|
plugins: xdist, bugzilla, cache, oejskit, cli, pep8, cov
|
||||||
collecting ... collected 50 items
|
collecting ... collected 50 items
|
||||||
|
|
||||||
test_module.py f..................f..................f...........
|
test_module.py f..................f..................f...........
|
||||||
|
|
||||||
================================= FAILURES =================================
|
================================= FAILURES =================================
|
||||||
_______________________________ test_func[0] _______________________________
|
_______________________________ test_func[0] _______________________________
|
||||||
/home/hpk/tmp/doc-exec-420/test_module.py:6: running the test CRASHED with signal 15
|
/home/hpk/tmp/doc-exec-420/test_module.py:6: running the test CRASHED with signal 15
|
||||||
@@ -40,13 +40,13 @@ You'll see that a couple of tests are reported as crashing, indicated
|
|||||||
by lower-case ``f`` and the respective failure summary. You can also use
|
by lower-case ``f`` and the respective failure summary. You can also use
|
||||||
the xdist-provided parallelization feature to speed up your testing::
|
the xdist-provided parallelization feature to speed up your testing::
|
||||||
|
|
||||||
$ py.test --boxed -n3
|
$ py.test -n3
|
||||||
=========================== test session starts ============================
|
=========================== test session starts ============================
|
||||||
platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev8
|
platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev8
|
||||||
plugins: xdist, bugzilla, cache, oejskit, cli, pep8, cov
|
plugins: xdist, bugzilla, cache, oejskit, cli, pep8, cov
|
||||||
gw0 I / gw1 I / gw2 I
|
gw0 I / gw1 I / gw2 I
|
||||||
gw0 [50] / gw1 [50] / gw2 [50]
|
gw0 [50] / gw1 [50] / gw2 [50]
|
||||||
|
|
||||||
scheduling tests via LoadScheduling
|
scheduling tests via LoadScheduling
|
||||||
..f...............f..................f............
|
..f...............f..................f............
|
||||||
================================= FAILURES =================================
|
================================= FAILURES =================================
|
||||||
|
|||||||
Reference in New Issue
Block a user