In Module16, there is an example to import dataprovider. To repeat a test case on parameterizing with different set of data.
But, I'm unable to import Dataprovider in Pycharm.
import dataprovider
import pytest
class Test_A():
@pytest.mark.parametrize("username","password",[("user1","pass1"),("user2","pass2"),("user3","pass3")])
def test_A(self):
print("I'm in test A")
print(dataprovider.data("username","password"))
I misunderstood the dataprovider as a package. But, its a user created python file.
Sorry for the confusion. Closing the ticket.
Instructor
09914040666 Replied on 18/08/2020
Hey,
Thanks for the update.