我是python的新手,正在研究python 3.4.3。执行以下代码时收到错误: test_Login()缺少2个必需的位置参数:“用户名”和“密码”
请您帮忙?
下面是我的脚本:
@pytest.mark.usefixtures("oneTimeSetup","setUp")
@ddt
class ATS_Login(unittest.TestCase):
log = CL.customLogger(logging.DEBUG)
@pytest.fixture(autouse=True)
def classsetup(self, oneTimeSetup, setUp):
self.AL=ATS_Login_page(self.driver)
self.LO = ATS_Logout_page(self.driver)
self.LD=ATS_Leaves(self.driver)
self.SV=ATS_SalarySlip(self.driver)
@pytest.mark.run(order=1)
@data(*getcredentials("C:\\Users\\HP\\PycharmProjects\\ATS\\utilities\\testdata.csv"))
@unpack
def test_Login(self,username,password):
self.AL.login(username,password)
下面是testdata.csv的内容
username,password
rupesh.doshi@gmail.com,rupesh