代碼中加了一個註釋
···
@ddt.data(
['郵箱格式不正確','111'],
['郵箱格式不正確','111@163'],
['郵箱格式不正確','111@163@'],
['郵箱格式不正確','[email protected]']
)
@ddt.unpack
···
@ddt.data(*data)
def test_register(self,data):
error_info,email = data
email_error = self.login.email_error(error_info,email)
self.assertTrue(email_error)
報錯信息:
@ddt.data(*data) ^
IndentationError: unexpected indent
解決方法:
刪除註釋