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
allow tests to declare ordering dependencies on other tests. For example, if test 'a' assumes you've modified the state of a fixture in 'b', require that test 'b' was run in the current session and was successful if a request to run test 'a' is found. This should be handled both by ensuring correct ordering in the pytest_collection_modifyitems hook and by ensuring that filters do not trim require prerequisites.
While one may argue that each test should work in isolation some hardware tests can take a very long time to run. Repeating such steps to ensure the attached hardware is in the correct state can become onerous.
Here's a hypothetical example: a linux computer requires that an OS image is freshly installed. Subsequent tests may pollute the installed environment so each test session starts with a fresh image. Reinstalling linux for every test would (in our hypothetical example) add hours to a test suite that would otherwise complete in 30 minutes. Instead we allow each test to assert something like @pytest.mark.after_success_of('test_install_linux')
The text was updated successfully, but these errors were encountered:
allow tests to declare ordering dependencies on other tests. For example, if test 'a' assumes you've modified the state of a fixture in 'b', require that test 'b' was run in the current session and was successful if a request to run test 'a' is found. This should be handled both by ensuring correct ordering in the
pytest_collection_modifyitems
hook and by ensuring that filters do not trim require prerequisites.While one may argue that each test should work in isolation some hardware tests can take a very long time to run. Repeating such steps to ensure the attached hardware is in the correct state can become onerous.
Here's a hypothetical example: a linux computer requires that an OS image is freshly installed. Subsequent tests may pollute the installed environment so each test session starts with a fresh image. Reinstalling linux for every test would (in our hypothetical example) add hours to a test suite that would otherwise complete in 30 minutes. Instead we allow each test to assert something like
@pytest.mark.after_success_of('test_install_linux')
The text was updated successfully, but these errors were encountered: