首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

聊聊 Python 的单元测试框架(二):nose 和它的继任者 nose2

、目录、函数、类的名称模式(正则匹配) nosetests -w project_directory "test_.+" nose 也支持执行指定用例: 指定测试模块 nosetests test.module...指定测试类 nosetests a.test:TestCase 指定测试方法 nosetests another.test:TestCase.test_method 指定测试文件路径 nosetests.../path/to/test/file.py 指定测试文件路径+测试类或测试函数(这是 unittest 所不支持的) nosetests /path/to/test/file.py:TestCase...nosetests /path/to/test/file.py:TestCase.test_method nosetests /path/to/test/file.py:test_function 1.3...得益于 nose 丰富的插件生态,当 nose 本身不能够完全满足我们的测试需求时,可以通过安装插件,并在 nosetests 命令行指定该插件所提供的特定参数即可非常容易的使用插件。

1.1K40
领券