在我的UnitTest
目录中,我有两个文件,mymath.py
和{
mymath.py
文件:
def add(a, b):
return a + b
def subtract(a, b):
return a - b
def multiply(a, b):
return a * b
def divide(numerator, denominator):
return float(numerator) / denominator
并且test_mymath.py
文件是:
当我运行命令时
python .\test_mymath.py
我有结果了
Ran 3 tests in 0.000s
OK
但是当我试着用
python -m unittest .\test_mymath.py
我搞错了
ValueError: Empty module name
我关注这个article
我的python版本是Python 3.6.6
,我在本地机器上使用windows10。在
使用
python -m unittest test_mymath
相关问题 更多 >
编程相关推荐