classification
Title: Tools/demo/eiffel.py fails to run tests.
Type: behavior Stage: resolved
Components: Demos and Tools Versions: Python 3.4, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: iwontbecreative, python-dev, serhiy.storchaka
Priority: normal Keywords: easy

Created on 2013-07-14 08:26 by iwontbecreative, last changed 2013-07-16 19:40 by serhiy.storchaka. This issue is now closed.

Messages (4)
msg193038 - (view) Author: Févry Thibault (iwontbecreative) * Date: 2013-07-14 08:26
Using trunk.

.Tools/demo/eiffel.py -v
testEiffelMetaClass1 (__main__.Tests) ... FAIL
testEiffelMetaClass2 (__main__.Tests) ... FAIL

======================================================================
FAIL: testEiffelMetaClass1 (__main__.Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./eiffel.py", line 102, in testEiffelMetaClass1
    self._test(EiffelMetaClass1)
  File "./eiffel.py", line 137, in _test
    self.assertRaises(AssertionError, t.m2, 0)
AssertionError: AssertionError not raised by m2

======================================================================
FAIL: testEiffelMetaClass2 (__main__.Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./eiffel.py", line 105, in testEiffelMetaClass2
    self._test(EiffelMetaClass2)
  File "./eiffel.py", line 137, in _test
    self.assertRaises(AssertionError, t.m2, 0)
AssertionError: AssertionError not raised by m2

----------------------------------------------------------------------
Ran 2 tests in 0.001s

FAILED (failures=2)
msg193151 - (view) Author: Févry Thibault (iwontbecreative) * Date: 2013-07-16 02:44
Interessting update : The test does *not* fail all the time. It succeeds about 1/3 times on my computer.
msg193179 - (view) Author: Févry Thibault (iwontbecreative) * Date: 2013-07-16 16:05
One more update. When it fails, it sometimes fails with :

======================================================================
ERROR: testEiffelMetaClass1 (__main__.Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Tools/demo/eiffel.py", line 102, in testEiffelMetaClass1
    self._test(EiffelMetaClass1)
  File "./Tools/demo/eiffel.py", line 112, in _test
    class Test(Eiffel):
  File "./Tools/demo/eiffel.py", line 17, in __new__
    meta, name, bases, dict)
TypeError: type __qualname__ must be a str, not function

======================================================================
ERROR: testEiffelMetaClass2 (__main__.Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Tools/demo/eiffel.py", line 105, in testEiffelMetaClass2
    self._test(EiffelMetaClass2)
  File "./Tools/demo/eiffel.py", line 112, in _test
    class Test(Eiffel):
  File "./Tools/demo/eiffel.py", line 17, in __new__
    meta, name, bases, dict)
TypeError: type __qualname__ must be a str, not EiffelDescriptor

----------------------------------------------------------------------
Ran 2 tests in 0.004s

As I have no experience with metaclasses and all that stuff, I won't be able to fix it/find what's wrong.
msg193186 - (view) Author: Roundup Robot (python-dev) Date: 2013-07-16 19:16
New changeset a9f7c2d49149 by Serhiy Storchaka in branch '2.7':
Issue #18448: Fix a typo in Demo/newmetaclasses/Eiffel.py.
http://hg.python.org/cpython/rev/a9f7c2d49149

New changeset 6e8ad6071100 by Serhiy Storchaka in branch '3.3':
Issue #18448: Fix a typo in Tools/demo/eiffel.py.
http://hg.python.org/cpython/rev/6e8ad6071100

New changeset 128618d2589c by Serhiy Storchaka in branch 'default':
Issue #18448: Fix a typo in Tools/demo/eiffel.py.
http://hg.python.org/cpython/rev/128618d2589c
History
Date User Action Args
2013-07-16 19:40:35serhiy.storchakasetversions: + Python 2.7
2013-07-16 19:39:58serhiy.storchakasetstatus: open -> closed
assignee: serhiy.storchaka
resolution: fixed
stage: resolved
2013-07-16 19:16:35python-devsetnosy: + python-dev
messages: + msg193186
2013-07-16 16:05:27iwontbecreativesetmessages: + msg193179
2013-07-16 11:53:01serhiy.storchakasettype: behavior
versions: + Python 3.3, Python 3.4
2013-07-16 02:44:23iwontbecreativesetmessages: + msg193151
2013-07-14 08:53:11serhiy.storchakasetkeywords: + easy
nosy: + serhiy.storchaka
2013-07-14 08:26:36iwontbecreativecreate