标签: ddt

@ddt是否与py.test一起使用?

@ddt是否与py.test一起使用还是必须使用unittest格式?我有一个测试,其中安装夹具在conftest.py文件中.当我运行测试时,它会因为没有运行安装夹具而出错.例如:

@ddt
class Test_searchProd:
  @data(['clothes': 3],['shoes': 4])
  @unpack
  def test_searchAllProduct(setup,productType):
      .....
Run Code Online (Sandbox Code Playgroud)

基本上,设置夹具是打开一个特定的URL ...我做错了什么或者@ddt不适用于py.test?

python selenium pytest ddt

3
推荐指数
1
解决办法
1766
查看次数

标签 统计

ddt ×1

pytest ×1

python ×1

selenium ×1