Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pytest_random_order/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def pytest_addoption(parser):
)


def pytest_configure(config):
config.addinivalue_line("markers", "random_order(disabled=True): disable reordering of tests within a module or class")


def pytest_report_header(config):
out = None

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def read(fname):

setup(
name='pytest-random-order',
version='0.5.0',
version='0.5.1',
author='Jazeps Basko',
author_email='jazeps.basko@gmail.com',
maintainer='Jazeps Basko',
Expand Down
9 changes: 9 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ def test_help_message(testdir):
'random-order:',
'*--random-order-bucket={global,package,module,class}*',
])


def test_markers_message(testdir):
result = testdir.runpytest(
'--markers',
)
result.stdout.fnmatch_lines([
'*@pytest.mark.random_order(disabled=True): disable reordering*',
])