VScode 单元测试配置 [英] VScode unittest configuration
本文介绍了VScode 单元测试配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通常使用这个命令从我的项目根目录运行我的 python (3.6) 单元测试
I generally use this command to run my python (3.6) unittests from my project root directory
python -m unittestdiscover -v -s .-p "test_*.py"
但是,我无法使用 vscode 进行设置.我的配置是
However, I am not able to set it up using vscode. My configuration is
"python.testing.unittestArgs": ["-v", "-s", ".", "-p", "test_*.py"],
"python.testing.pytestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.unittestEnabled": true
我收到消息
No tests discovered, please check the configuration settings for the tests.
如何更正我的 vscode 设置以运行单元测试.
How do I correct my vscode settings to run the unittests.
推荐答案
设置
"python.testing.unittestArgs": ["-v", "-s", ".", "-p", "test*.py"],
工作.
这篇关于VScode 单元测试配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文