小编tra*_*zti的帖子

Python unittest忽略了numpy

我正在使用unittest编写python测试并从命令行运行测试

 nosetests --with-coverage -x
Run Code Online (Sandbox Code Playgroud)

当我在我的一个测试中包含numpy时,它也试图测试numpy包.示例输出:

...
Name                            Stmts   Miss  Cover   Missing
-------------------------------------------------------------
CLOCK                              39     33    15%   3, 7-13, 17, 20-25, 28-47
LFU                                42      1    98%   52
LRU                                95      9    91%   12, 64, 68, 101, 115-118, 131
LRU10                              54      1    98%   68
LRU3                               54      1    98%   68
argparse                         1177   1177     0%   3-2361
cache                              86     33    62%   36-47, 86-89, 95-116
common                             87     54    38%   17, 20, 23, 28, 31-32, 35-36, 39, 42, 46, 48, 50, 52, 54, 57-64, 67-68, 72-89, 95-96, 102-107, …
Run Code Online (Sandbox Code Playgroud)

python unit-testing numpy nosetests python-unittest

8
推荐指数
1
解决办法
1008
查看次数

标签 统计

nosetests ×1

numpy ×1

python ×1

python-unittest ×1

unit-testing ×1