[TIP] TypeError (__class__ assignment: 'UnboundSelf' object layout differs from 'TestTZ2Info') on Python 3

Chris Withers chris at simplistix.co.uk
Fri Mar 14 02:09:31 PDT 2014


Hi Guys,

One of my weekly CI runs has started failing as below. This appears to 
be Python 3 only and lines up nicely with the latest nose release. 
Here's the matrix of affected python versions:

http://jenkins.simplistix.co.uk/job/testfixtures-buildout/

Any ideas what changed and how I can fix it or when it will be fixed?
If it'd be better to log a bug somewhere, please let me know where...

cheers,

Chris


======================================================================
ERROR: Failure: TypeError (__class__ assignment: 'UnboundSelf' object 
layout differs from 'TestTZ2Info')
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/Users/Shared/Jenkins/.buildout/eggs/nose-1.3.1-py3.3.egg/nose/failure.py", 
line 39, in runTest
     raise self.exc_val.with_traceback(self.tb)
   File 
"/Users/Shared/Jenkins/.buildout/eggs/nose-1.3.1-py3.3.egg/nose/loader.py", 
line 516, in makeTest
     return self._makeTest(obj, parent)
   File 
"/Users/Shared/Jenkins/.buildout/eggs/nose-1.3.1-py3.3.egg/nose/loader.py", 
line 565, in _makeTest
     return self.loadTestsFromTestClass(obj)
   File 
"/Users/Shared/Jenkins/.buildout/eggs/nose-1.3.1-py3.3.egg/nose/loader.py", 
line 509, in loadTestsFromTestClass
     for case in filter(wanted, dir(cls))]
   File 
"/Users/Shared/Jenkins/.buildout/eggs/nose-1.3.1-py3.3.egg/nose/loader.py", 
line 508, in <listcomp>
     cases = [self.makeTest(getattr(cls, case), cls)
   File 
"/Users/Shared/Jenkins/.buildout/eggs/nose-1.3.1-py3.3.egg/nose/loader.py", 
line 504, in wanted
     item = unbound_method(cls, item)
   File 
"/Users/Shared/Jenkins/.buildout/eggs/nose-1.3.1-py3.3.egg/nose/pyversion.py", 
line 131, in unbound_method
     return UnboundMethod(cls, func)
   File 
"/Users/Shared/Jenkins/.buildout/eggs/nose-1.3.1-py3.3.egg/nose/pyversion.py", 
line 92, in __init__
     self.__self__.__class__ = cls
TypeError: __class__ assignment: 'UnboundSelf' object layout differs 
from 'TestTZ2Info'

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk



More information about the testing-in-python mailing list