@@ -35,9 +35,7 @@ You can then restrict a test run to only run tests marked with ``webtest``:
35
35
=========================== test session starts ============================
36
36
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
37
37
cachedir: .pytest_cache
38
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
39
38
rootdir: $REGENDOC_TMPDIR, inifile:
40
- plugins: hypothesis-3.x.y
41
39
collecting ... collected 4 items / 3 deselected
42
40
43
41
test_server.py::test_send_http PASSED [100%]
@@ -52,9 +50,7 @@ Or the inverse, running all tests except the webtest ones:
52
50
=========================== test session starts ============================
53
51
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
54
52
cachedir: .pytest_cache
55
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
56
53
rootdir: $REGENDOC_TMPDIR, inifile:
57
- plugins: hypothesis-3.x.y
58
54
collecting ... collected 4 items / 1 deselected
59
55
60
56
test_server.py::test_something_quick PASSED [ 33%]
@@ -76,9 +72,7 @@ tests based on their module, class, method, or function name:
76
72
=========================== test session starts ============================
77
73
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
78
74
cachedir: .pytest_cache
79
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
80
75
rootdir: $REGENDOC_TMPDIR, inifile:
81
- plugins: hypothesis-3.x.y
82
76
collecting ... collected 1 item
83
77
84
78
test_server.py::TestClass::test_method PASSED [100%]
@@ -93,9 +87,7 @@ You can also select on the class:
93
87
=========================== test session starts ============================
94
88
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
95
89
cachedir: .pytest_cache
96
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
97
90
rootdir: $REGENDOC_TMPDIR, inifile:
98
- plugins: hypothesis-3.x.y
99
91
collecting ... collected 1 item
100
92
101
93
test_server.py::TestClass::test_method PASSED [100%]
@@ -110,9 +102,7 @@ Or select multiple nodes:
110
102
=========================== test session starts ============================
111
103
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
112
104
cachedir: .pytest_cache
113
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
114
105
rootdir: $REGENDOC_TMPDIR, inifile:
115
- plugins: hypothesis-3.x.y
116
106
collecting ... collected 2 items
117
107
118
108
test_server.py::TestClass::test_method PASSED [ 50%]
@@ -152,9 +142,7 @@ select tests based on their names:
152
142
=========================== test session starts ============================
153
143
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
154
144
cachedir: .pytest_cache
155
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
156
145
rootdir: $REGENDOC_TMPDIR, inifile:
157
- plugins: hypothesis-3.x.y
158
146
collecting ... collected 4 items / 3 deselected
159
147
160
148
test_server.py::test_send_http PASSED [100%]
@@ -169,9 +157,7 @@ And you can also run all tests except the ones that match the keyword:
169
157
=========================== test session starts ============================
170
158
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
171
159
cachedir: .pytest_cache
172
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
173
160
rootdir: $REGENDOC_TMPDIR, inifile:
174
- plugins: hypothesis-3.x.y
175
161
collecting ... collected 4 items / 1 deselected
176
162
177
163
test_server.py::test_something_quick PASSED [ 33%]
@@ -188,9 +174,7 @@ Or to select "http" and "quick" tests:
188
174
=========================== test session starts ============================
189
175
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.6
190
176
cachedir: .pytest_cache
191
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
192
177
rootdir: $REGENDOC_TMPDIR, inifile:
193
- plugins: hypothesis-3.x.y
194
178
collecting ... collected 4 items / 2 deselected
195
179
196
180
test_server.py::test_send_http PASSED [ 50%]
@@ -232,8 +216,6 @@ You can ask which markers exist for your test suite - the list includes our just
232
216
$ pytest --markers
233
217
@pytest.mark.webtest: mark a test as a webtest.
234
218
235
- @pytest.mark.hypothesis: Tests which use hypothesis.
236
-
237
219
@pytest.mark.filterwarnings(warning): add a warning filter to the given test. see https://docs.pytest.org/en/latest/warnings.html#pytest-mark-filterwarnings
238
220
239
221
@pytest.mark.skip(reason=None): skip the given test function with an optional reason. Example: skip(reason="no way of currently testing this") skips the test.
@@ -383,9 +365,7 @@ the test needs:
383
365
$ pytest -E stage2
384
366
=========================== test session starts ============================
385
367
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
386
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
387
368
rootdir: $REGENDOC_TMPDIR, inifile:
388
- plugins: hypothesis-3.x.y
389
369
collected 1 item
390
370
391
371
test_someenv.py s [100%]
@@ -399,9 +379,7 @@ and here is one that specifies exactly the environment needed:
399
379
$ pytest -E stage1
400
380
=========================== test session starts ============================
401
381
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
402
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
403
382
rootdir: $REGENDOC_TMPDIR, inifile:
404
- plugins: hypothesis-3.x.y
405
383
collected 1 item
406
384
407
385
test_someenv.py . [100%]
@@ -413,8 +391,6 @@ The ``--markers`` option always gives you a list of available markers::
413
391
$ pytest --markers
414
392
@pytest.mark.env(name): mark test to run only on named environment
415
393
416
- @pytest.mark.hypothesis: Tests which use hypothesis.
417
-
418
394
@pytest.mark.filterwarnings(warning): add a warning filter to the given test. see https://docs.pytest.org/en/latest/warnings.html#pytest-mark-filterwarnings
419
395
420
396
@pytest.mark.skip(reason=None): skip the given test function with an optional reason. Example: skip(reason="no way of currently testing this") skips the test.
@@ -570,9 +546,7 @@ then you will see two tests skipped and two executed tests as expected:
570
546
$ pytest -rs # this option reports skip reasons
571
547
=========================== test session starts ============================
572
548
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
573
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
574
549
rootdir: $REGENDOC_TMPDIR, inifile:
575
- plugins: hypothesis-3.x.y
576
550
collected 4 items
577
551
578
552
test_plat.py s.s. [100%]
@@ -588,9 +562,7 @@ Note that if you specify a platform via the marker-command line option like this
588
562
$ pytest -m linux
589
563
=========================== test session starts ============================
590
564
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
591
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
592
565
rootdir: $REGENDOC_TMPDIR, inifile:
593
- plugins: hypothesis-3.x.y
594
566
collected 4 items / 3 deselected
595
567
596
568
test_plat.py . [100%]
@@ -643,9 +615,7 @@ We can now use the ``-m option`` to select one set:
643
615
$ pytest -m interface --tb=short
644
616
=========================== test session starts ============================
645
617
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
646
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
647
618
rootdir: $REGENDOC_TMPDIR, inifile:
648
- plugins: hypothesis-3.x.y
649
619
collected 4 items / 2 deselected
650
620
651
621
test_module.py FF [100%]
@@ -668,9 +638,7 @@ or to select both "event" and "interface" tests:
668
638
$ pytest -m "interface or event" --tb=short
669
639
=========================== test session starts ============================
670
640
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
671
- hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$REGENDOC_TMPDIR/.hypothesis/examples')
672
641
rootdir: $REGENDOC_TMPDIR, inifile:
673
- plugins: hypothesis-3.x.y
674
642
collected 4 items / 1 deselected
675
643
676
644
test_module.py FFF [100%]
0 commit comments