在早期版本的鼻子测试框架中,有几种方法只指定所有测试的一个子集:
nosetests test.module
nosetests another.test:TestCase.test_method
nosetests a.test:TestCase
nosetests /path/to/test/file.py:test_functionhttp://nose.readthedocs.org/en/latest/usage.html#selecting-tests
但是,我在Nose2中找不到关于类似测试选择的任何信息。文档中有一个关于不同测试发现的提及,但这似乎没有关系。
是否有一种方法可以在nose2或(更一般地) unittest2中选择特定的测试或测试用例?
发布于 2014-01-31 01:02:31
我在dev/test中有一些测试,例如:
dev/tests/test_file.py我可以用以下方式来运行:
nose2 -s dev tests.test_file此外,我能够在测试用例中运行特定的测试方法,如下所示:
nose2 -s dev tests.test_file.TestCase.test_method这能实现你想要的吗?
https://stackoverflow.com/questions/17890087
复制相似问题