Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Django Nose测试失败-从Nose代码回溯_Python_Django_Nose - Fatal编程技术网

Python Django Nose测试失败-从Nose代码回溯

Python Django Nose测试失败-从Nose代码回溯,python,django,nose,Python,Django,Nose,我无法运行django nose测试,所有进程都会因此回溯而失败: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/System/Library/Frameworks

我无法运行django nose测试,所有进程都会因此回溯而失败:

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/jeffquinn/Code/Nuna/data-intrawebVE/lib/python2.7/site-packages/nose/plugins/multiprocess.py", line 652, in runner
    keyboardCaught, shouldStop, loaderClass, resultClass, config)
  File "/Users/jeffquinn/Code/Nuna/data-intrawebVE/lib/python2.7/site-packages/nose/plugins/multiprocess.py", line 669, in __runner
    config.plugins.begin()
  File "/Users/jeffquinn/Code/Nuna/data-intrawebVE/lib/python2.7/site-packages/nose/plugins/manager.py", line 99, in __call__
    return self.call(*arg, **kw)
  File "/Users/jeffquinn/Code/Nuna/data-intrawebVE/lib/python2.7/site-packages/nose/plugins/manager.py", line 167, in simple
    result = meth(*arg, **kw)
  File "/Users/jeffquinn/Code/Nuna/data-intrawebVE/lib/python2.7/site-packages/nose/plugins/cover.py", line 156, in begin
    self.coverInstance.exclude('#pragma[: ]+[nN][oO] [cC][oO][vV][eE][rR]')
AttributeError: 'NoneType' object has no attribute 'exclude'
以下是来自
pip freeze
的相关位:

Django==1.5.1
MySQL-python==1.2.5
South==0.7.6
Werkzeug==0.8.3
boto==2.8.0
dj-database-url==0.2.1
django-appconf==0.6
django-compressor==1.2
django-extensions==1.0.3
django-json-field==0.5.5
django-nose==1.1
django-storages==1.1.6
django-waffle==0.9.0
djangorestframework==2.1.17
nose==1.3.1

还有人看到这个吗?我在这个pull请求()中看到了它,但不清楚解决方案是什么。

我只是进入了nose源代码并注释掉了第156-158行

    #self.coverInstance.exclude('#pragma[: ]+[nN][oO] [cC][oO][vV][eE][rR]')
    #self.coverInstance.load()
    #self.coverInstance.start()
我所有的测试现在都正常了。欧欧欧