Questions tagged [pytest-dependency]

Use this tag if you use the pytest-dependency plugin, which allows to mark tests as dependent on each other.

pytest-dependency allows to mark tests as dependent on other tests and ensures that the test execution order respects these dependencies. A test will also be skipped if a test it depends on had not passed.

Reference:

19 questions
0
votes
0 answers

How to execute single dependent test using pytest

I want to execute a single test that is dependent on another test. Let's say for the purpose of the question I have the following tests and one of them is depending on another test. I am using pytest-dependency. class TestClass: …
Gabriel kotev
  • 369
  • 3
  • 15
0
votes
1 answer

Session scope with pytest-dependency

Referring to the sample code copied from pytest-dependency, slight changes by removing "tests" folder, I am expecting "test_e" and "test_g" to pass, however, both are skipped. Kindly advise if I have done anything silly that stopping the session…
CarolL
  • 59
  • 2
  • 8
0
votes
1 answer

pytest dependency skips parameterized tests

I am writing tests using pytest. I have two tests, one depends on the other, I use pytest-dependency==0.5.1 for that. Something odd happens when I have two tests which depend on one another, but both parameterized - the dependent test is skipped…
Tal
  • 398
  • 4
  • 19
-1
votes
2 answers

Can't make pytest dependency work for different modules

Following this answer and the doc, I am trying to make tests depend on each other between files: test_connectivity.py: @pytest.mark.dependency(depends=["test_services_up.py::test_sssss"], scope="session") def test_aaa(): assert…
Gulzar
  • 23,452
  • 27
  • 113
  • 201
1
2