Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何使用@pytest对测试用例进行排序_Python_Python 2.7_Unit Testing_Selenium_Selenium Webdriver - Fatal编程技术网

Python 如何使用@pytest对测试用例进行排序

Python 如何使用@pytest对测试用例进行排序,python,python-2.7,unit-testing,selenium,selenium-webdriver,Python,Python 2.7,Unit Testing,Selenium,Selenium Webdriver,伙计们帮我解决这个问题。。我想使用注释对测试用例进行排序 import pytest @pytest.mark.run(order=2) 但它不工作,我使用命令pip install pytest安装 告诉我如何解决这个问题,或者给我一些替代解决方案您使用的语法不是来自pytest,而是来自插件,您可以使用pip安装pytest来安装。。我已经安装了“pip install pytest ordering”——在“mark”之后——run(order=1)它不起作用——你所说的——在“mark

伙计们帮我解决这个问题。。我想使用注释对测试用例进行排序

import pytest
@pytest.mark.run(order=2)
但它不工作,我使用命令
pip install pytest安装

告诉我如何解决这个问题,或者给我一些替代解决方案

您使用的语法不是来自
pytest
,而是来自插件,您可以使用
pip安装pytest来安装。。我已经安装了“pip install pytest ordering”——在“mark”之后——run(order=1)它不起作用——你所说的——在“mark”之后——run(order=1)是什么意思?请为你的测试更新相关的源代码,你期望发生什么,以及实际发生了什么