Set tests order or dependencies #993
AymanElsayeed
started this conversation in
General
Replies: 2 comments 6 replies
-
there is no builtin mechanism for test dependencies , im not aware of a plugin that also supports xdist, xdist currently doesnt support passing over the necesary annotations and making use of them |
Beta Was this translation helpful? Give feedback.
6 replies
-
I'm also interested in this feature. To maximize the running efficiency of the tests running in parallel it is important that the slower tests run first, and i do it by marking the tests with the decorator @pytest.mark.order(0) from the pytest-order library. however this is not respected by xdist, can you possibly fix it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The goal: To be able to set a test order
Usecase:
When i have a test, its input or results depend on the data (or procedure on an object ) that other tests process, regardless of the result.
Example:
A test (test-A) during the test, a table in a database updated ( as a sequence of operations on some object)
test-B (assuming test-A finished regardless of its result) checks whether or not the database has been updated.
My case:
I have a list of objects, and different tests are executed on those objects.
As a result of the test execution on those objects, a specific data field is updated ( a state as a result of sending the object to an external system for processing data).
When all tests finish, I want to run a test that checks the data filed on each object.
What i am avoiding
Notes/constraints:
Beta Was this translation helpful? Give feedback.
All reactions