Timeline for run dependant tests with pytest
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 1, 2022 at 16:58 | comment | added | NPatel |
I am also facing same, when we filter with marker, pytest should know, this marker is depend on test_a then it should run test_a first.
|
|
| Sep 2, 2022 at 5:09 | comment | added | vk-code | I am also searching for something that would add the dependent test cases automatically if not explicitly selected. | |
| Nov 29, 2021 at 17:51 | vote | accept | Thomas | ||
| Nov 29, 2021 at 9:08 | answer | added | Shod | timeline score: 3 | |
| Nov 22, 2021 at 15:17 | comment | added | MrBean Bremen |
I see. The only other possibility I see (aside from just adding the markers) is to add the markers programmatically, for example in pytest_collection_modifyitems using item.addmarker(), but for that, you would have to know or detect the dependencies in that place, which is probably not easier. Or write a plugin that automatically copies markers to dependent tests...
|
|
| Nov 22, 2021 at 15:10 | comment | added | Thomas | @MrBean Bremen, I edited the post to explain it | |
| Nov 22, 2021 at 15:10 | history | edited | Thomas | CC BY-SA 4.0 |
add explanation for a comment
|
| Nov 22, 2021 at 14:47 | comment | added | MrBean Bremen |
If you filter by markers, this is not possible, AFAIK. Can you elaborate on why you can't add the marker to test_a?
|
|
| Nov 22, 2021 at 14:02 | history | asked | Thomas | CC BY-SA 4.0 |