我无法理解为什么我只在特定机器上看到此错误而在其他机器上却没有。
我使用nosetest命令调用所有测试用例。
======================================================================
ERROR: Failure: AttributeError (attribute '__name__' of 'objc_class' objects is not writable)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/nose-1.3.4-py2.7.egg/nose/loader.py", line 519, in makeTest
return self._makeTest(obj, parent)
File "/Library/Python/2.7/site-packages/nose-1.3.4-py2.7.egg/nose/loader.py", line 564, in _makeTest
obj = transplant_class(obj, parent.__name__)
File "/Library/Python/2.7/site-packages/nose-1.3.4-py2.7.egg/nose/util.py", line 644, in transplant_class
C.__name__ = cls.__name__
AttributeError: attribute '__name__' of 'objc_class' objects is not writable
======================================================================
======================================================================
ERROR: Failure: error (C is overriding existing Objective-C class)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/nose-1.3.4-py2.7.egg/nose/loader.py", line 519, in makeTest
return self._makeTest(obj, parent)
File "/Library/Python/2.7/site-packages/nose-1.3.4-py2.7.egg/nose/loader.py", line 564, in _makeTest
obj = transplant_class(obj, parent.__name__)
File "/Library/Python/2.7/site-packages/nose-1.3.4-py2.7.egg/nose/util.py", line 641, in transplant_class
class C(cls):
error: C is overriding existing Objective-C class