You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -244,7 +244,7 @@ You can ask which markers exist for your test suite - the list includes our just
244
244
245
245
@pytest.mark.parametrize(argnames, argvalues): call a test function multiple times passing in different arguments in turn. argvalues generally needs to be a list of values if argnames specifies only one name or a list of tuples of values if argnames specifies multiple names. Example: @parametrize('arg1', [1,2]) would lead to two calls of the decorated test function, one with arg1=1 and another with arg1=2.see https://docs.pytest.org/en/stable/how-to/parametrize.html for more info and examples.
246
246
247
-
@pytest.mark.usefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures. see https://docs.pytest.org/en/stable/how-to/fixtures.html#usefixtures
247
+
@pytest.mark.usefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures. see https://docs.pytest.org/en/stable/explanation/fixtures.html#usefixtures
248
248
249
249
@pytest.mark.tryfirst: mark a hook implementation function such that the plugin machinery will try to call it first/as early as possible.
250
250
@@ -398,8 +398,8 @@ the test needs:
398
398
$ pytest -E stage2
399
399
=========================== test session starts ============================
400
400
platform linux -- Python 3.x.y, pytest-6.x.y, py-1.x.y, pluggy-1.x.y
401
-
cachedir: $PYTHON_PREFIX/.pytest_cache
402
-
rootdir: $REGENDOC_TMPDIR
401
+
cachedir: .pytest_cache
402
+
rootdir: /home/sweet/project
403
403
collected 1 item
404
404
405
405
test_someenv.py s [100%]
@@ -413,8 +413,8 @@ and here is one that specifies exactly the environment needed:
413
413
$ pytest -E stage1
414
414
=========================== test session starts ============================
415
415
platform linux -- Python 3.x.y, pytest-6.x.y, py-1.x.y, pluggy-1.x.y
416
-
cachedir: $PYTHON_PREFIX/.pytest_cache
417
-
rootdir: $REGENDOC_TMPDIR
416
+
cachedir: .pytest_cache
417
+
rootdir: /home/sweet/project
418
418
collected 1 item
419
419
420
420
test_someenv.py . [100%]
@@ -488,7 +488,7 @@ The output is as follows:
488
488
.. code-block:: pytest
489
489
490
490
$ pytest -q -s
491
-
Mark(name='my_marker', args=(<function hello_world at 0xdeadbeef>,), kwargs={})
491
+
Mark(name='my_marker', args=(<function hello_world at 0xdeadbeef0001>,), kwargs={})
492
492
.
493
493
1 passed in 0.12s
494
494
@@ -606,8 +606,8 @@ then you will see two tests skipped and two executed tests as expected:
606
606
$ pytest -rs # this option reports skip reasons
607
607
=========================== test session starts ============================
608
608
platform linux -- Python 3.x.y, pytest-6.x.y, py-1.x.y, pluggy-1.x.y
609
-
cachedir: $PYTHON_PREFIX/.pytest_cache
610
-
rootdir: $REGENDOC_TMPDIR
609
+
cachedir: .pytest_cache
610
+
rootdir: /home/sweet/project
611
611
collected 4 items
612
612
613
613
test_plat.py s.s. [100%]
@@ -623,8 +623,8 @@ Note that if you specify a platform via the marker-command line option like this
623
623
$ pytest -m linux
624
624
=========================== test session starts ============================
625
625
platform linux -- Python 3.x.y, pytest-6.x.y, py-1.x.y, pluggy-1.x.y
626
-
cachedir: $PYTHON_PREFIX/.pytest_cache
627
-
rootdir: $REGENDOC_TMPDIR
626
+
cachedir: .pytest_cache
627
+
rootdir: /home/sweet/project
628
628
collected 4 items / 3 deselected / 1 selected
629
629
630
630
test_plat.py . [100%]
@@ -687,8 +687,8 @@ We can now use the ``-m option`` to select one set:
687
687
$ pytest -m interface --tb=short
688
688
=========================== test session starts ============================
689
689
platform linux -- Python 3.x.y, pytest-6.x.y, py-1.x.y, pluggy-1.x.y
690
-
cachedir: $PYTHON_PREFIX/.pytest_cache
691
-
rootdir: $REGENDOC_TMPDIR
690
+
cachedir: .pytest_cache
691
+
rootdir: /home/sweet/project
692
692
collected 4 items / 2 deselected / 2 selected
693
693
694
694
test_module.py FF [100%]
@@ -714,8 +714,8 @@ or to select both "event" and "interface" tests:
714
714
$ pytest -m "interface or event" --tb=short
715
715
=========================== test session starts ============================
716
716
platform linux -- Python 3.x.y, pytest-6.x.y, py-1.x.y, pluggy-1.x.y
0 commit comments