unittest pattern
时间: 2024-01-31 22:01:58 浏览: 62
Unittest
在unittest中,pattern参数用于指定测试用例文件的模式。模式中可以使用通配符来匹配多个文件。例如,pattern="test_*.py"表示匹配所有以"test_"开头的.py文件作为测试用例文件。这样,TestLoader会自动搜索指定目录下符合模式的文件,并将它们加载为测试用例。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [UnitTest单元测试框架详解](https://blog.csdn.net/weixin_43170741/article/details/127943305)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [Python unittest 自动识别并执行测试用例方式](https://download.csdn.net/download/weixin_38577200/14850157)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文