我是靠谱客的博主 大方美女,最近开发中收集的这篇文章主要介绍Launching unittests with arguments python -m unittest,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
代码中含有test关键字,或者test为前缀开头也是有问题的`,检测到test,pycharm会自动进入单元测试
def test():
correct = 0
total = 0`
def test1():
correct = 0
total = 0
以上两个都是有问题的
解决办法:::::::::
可以
def super_test1():
correct = 0
total = 0
参考大佬:
https://blog.csdn.net/weixin_44024993/article/details/107567954
最后
以上就是大方美女为你收集整理的Launching unittests with arguments python -m unittest的全部内容,希望文章能够帮你解决Launching unittests with arguments python -m unittest所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复