markers.requires module

requires_test(test_name_or_nodeid): Mark a test as requiring another test

If another test is required to have run and passed before a suite of tests has any hope of succeeding, such as a smoke test, apply this mark to those tests.

It takes a test name as the only positional argument. In the event that the test name is ambiguous, a full py.test nodeid can be used. A test’s nodeid can be found by inspecting the request.node.nodeid attribute inside the required test item.