简体   繁体   中英

Django Nose Tests Failing - Traceback from Nose Code

I am unable to run django nose tests, all processes fail with this traceback:

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'

Here are the relevant bits from 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

Anyone else seen this? I've seen it mentioned in this pull request ( https://github.com/nose-devs/nose/pull/710 ) but not clear what the solution was.

I just went into the nose source code and commented out lines 156-158.

    #self.coverInstance.exclude('#pragma[: ]+[nN][oO] [cC][oO][vV][eE][rR]')
    #self.coverInstance.load()
    #self.coverInstance.start()

All my tests run fine now. O_o

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM