Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #973 (closed defect: worksforme)

Opened 11 years ago

Last modified 10 years ago

weird error running nosetests

Reported by: max Owned by: anonymous
Priority: normal Milestone: 1.0b2
Component: TurboGears Version: 0.9a5
Severity: normal Keywords:
Cc:

Description

I tried to run nosetests with code coverage turned on and got the following traceback:

======================================================================
ERROR: test module tests in D:\Projects\Spaca\spaca
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python24\lib\site-packages\nose-0.9.0b2-py2.4.egg\nose\suite.py", line 44, in run
    self.setUp()
  File "c:\python24\lib\site-packages\nose-0.9.0b2-py2.4.egg\nose\suite.py", line 187, in setUp
    self.module = _import(self.moduleName, [self.path], self.conf)
  File "c:\python24\lib\site-packages\nose-0.9.0b2-py2.4.egg\nose\importer.py", line 93, in _import
    mod = load_module(fqname, fh, filename, desc)
  File "D:\Projects\Spaca\spaca\tests\__init__.py", line 25, in ?
    from turbogears.config import update_config
  File "d:\projects\3rd-party\turbogears-1.0\turbogears\__init__.py", line 8, in ?
    from turbogears import controllers, view, database, validators, command, \
  File "d:\projects\3rd-party\turbogears-1.0\turbogears\widgets\__init__.py", line 7, in ?
    from turbogears.widgets.links import *
  File "d:\projects\3rd-party\turbogears-1.0\turbogears\widgets\links.py", line 3, in ?
    class Tabber(Widget):
  File "d:\projects\3rd-party\turbogears-1.0\turbogears\widgets\links.py", line 10, in Tabber
    location=js_location.bodytop),
  File "d:\projects\3rd-party\turbogears-1.0\turbogears\widgets\meta.py", line 142, in widget_init
    func(self, *args, **kw)
  File "d:\projects\3rd-party\turbogears-1.0\turbogears\widgets\base.py", line 531, in __init__
    if location not in js_location:
  File "d:\projects\3rd-party\turbogears-1.0\turbogears\util.py", line 39, in __cmp__
    assert self.EnumType is other.EnumType, "Only values from the same enum are comparable"
AttributeError: 'EnumValue' object has no attribute 'EnumType'

----------------------------------------------------------------------
Ran 0 tests in 5.829s

Change History

comment:1 Changed 11 years ago by max

I'm using SVN r1572.

comment:2 Changed 11 years ago by jorge.vargas

  • Milestone set to 1.0b2

still happening?

comment:3 Changed 11 years ago by alberto

  • Status changed from new to closed
  • Resolution set to worksforme

I think we can safely close this. I get:

(Test)jal:~/src/python/checkouts/turbogears alberto$ nosetests --with-coverage --cover-package=turbogears
........................Registering Service turbogears: development._http._tcp port 8080 path=/
.No handlers could be found for logger "turbogears.identity"
...............................................................................................................................................................E..............................................
======================================================================
ERROR: test module turbogears.tests.test_decorator in /Users/alberto/src/python/checkouts/turbogears
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/alberto/Test/lib/python2.4/nose-0.9.0-py2.4.egg/nose/suite.py", line 44, in run
    self.setUp()
  File "/Users/alberto/Test/lib/python2.4/nose-0.9.0-py2.4.egg/nose/suite.py", line 187, in setUp
    self.module = _import(self.moduleName, [self.path], self.conf)
  File "/Users/alberto/Test/lib/python2.4/nose-0.9.0-py2.4.egg/nose/importer.py", line 97, in _import
    cache[fqname] = mod
  File "/Users/alberto/Test/lib/python2.4/nose-0.9.0-py2.4.egg/nose/importer.py", line 97, in _import
    cache[fqname] = mod
  File "/Users/alberto/Test/lib/python2.4/PyProtocols-1.0a0dev_r2082-py2.4-macosx-10.4-fat.egg/protocols/advice.py", line 295, in tracer
    oldtrace[0] = oldtrace[0](frm,event,arg)
  File "/Users/alberto/Test/lib/python2.4/PyProtocols-1.0a0dev_r2082-py2.4-macosx-10.4-fat.egg/protocols/advice.py", line 289, in tracer
    frm.f_locals[k] = callback(frm,k,v,old_locals)
  File "/Users/alberto/src/turbogears/turbogears/decorator.py", line 58, in callback
  File "/Users/alberto/src/turbogears/turbogears/decorator.py", line 16, in decorate
  File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/inspect.py", line 677, in getargspec
    raise TypeError('arg is not a Python function')
TypeError: arg is not a Python function

.... (snip: loads of cover info... (BTW, we're at 51% but most of it is spuriously hidden in kid templates used by widgets) ....

TOTAL                                                                     22263  11507    51%   
----------------------------------------------------------------------
Ran 230 tests in 34.753s

FAILED (errors=1)

In [2255] and is (probably, I guess....) related to PyProtocols? tracer magic being incompatible with coverage.py. Nothing we should lose our sleep for IMO ;)

Alberto

Note: See TracTickets for help on using tickets.