Unable to Import and install Dataprovider in Pycharm | Selenium Python Forum
M
Mohana Krishnan Posted on 16/08/2020

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"))

M
Mohana Krishnan Replied on 16/08/2020

I misunderstood the dataprovider as a package. But, its a user created python file.

 

Sorry for the confusion. Closing the ticket.


S
Sejal Replied on 18/08/2020

Hey, 

Thanks for the update.