0

enter image description hereenter image description hereI need your kind help to access a feature from any directory to my test class in pytest.

I can create the fixture inside the test class itself and call without any problem and it works fine too. I also know that creating the desired fixture in conftest.py will also help me.

However, my specific requirement is, I need to define a fixture in a separate directory and call in my test class(es).

Please refer to the screenshots, to understand my requirement exactly.

In data/testdata/InvalidLoginData.py, I have defined the fixture.

I want to use the data in test_invalidlogin.py

Could you please advise -

  1. If I am doing any mistake?
  2. Is it possible in pytest?

Edit: I checked this and this, but they do not suit my requirement.

Prabodh Ghosh
  • 161
  • 2
  • 17

0 Answers0