File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 22
22
'eighth_to_last' : - 8 ,
23
23
}
24
24
25
+
26
+ def pytest_configure (config ):
27
+ """Register the "run" marker.
28
+ """
29
+ config_line = (
30
+ 'run: specify ordering information for when tests should run '
31
+ 'in relation to one another. Provided by pytest-ordering. '
32
+ 'See also: http://pytest-ordering.readthedocs.org/'
33
+ )
34
+ config .addinivalue_line ('markers' , config_line )
35
+
36
+
25
37
def pytest_collection_modifyitems (session , config , items ):
26
38
items [:] = list (_order_tests (items ))
27
39
Original file line number Diff line number Diff line change @@ -45,6 +45,11 @@ def test_ordering(module_name, capsys):
45
45
assert list (module .ordering ) == get_order (out , relative_filename )
46
46
47
47
48
+ def test_run_marker_registered (capsys ):
49
+ pytest .main ('--markers' )
50
+ out , err = capsys .readouterr ()
51
+ assert '@pytest.mark.run' in out
52
+
48
53
def test_version ():
49
54
assert hasattr (pytest_ordering , '__version__' )
50
55
assert re .match (r'[0-9]+\.[0-9]+(\.[0-9]+)?$' , pytest_ordering .__version__ )
You can’t perform that action at this time.
0 commit comments