#6298 defect closed duplicate (duplicate)

LookupsTestCase.test_importExceptions failing on python 3.3

Reported by: thijs Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: thijs Branch: branches/import-checkstack-6298
(diff, github, buildbot, log)
Author: thijs Launchpad Bug:

Description

test_importExceptions is failing on Python 3.3 only because a statement was modified to clean up Python 2.3 code which introduced an issue in test_reflectpy3.LookupsTestCase. This wasn't caught initially because the buildslave for python 3.3 is down (at the time of this writing).

======================================================================
FAIL: test_importExceptions (twisted.python.test.test_reflectpy3.LookupsTestCase)
test_importExceptions
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/trial/_synctest.py", line 328, in assertRaises
    result = f(*args, **kwargs)
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/python/_reflectpy3.py", line 273, in namedAny
    obj = getattr(obj, n)
AttributeError: 'module' object has no attribute 'reflect_helper_IE'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/trial/_synctest.py", line 1185, in _run
    runWithWarningsSuppressed(suppress, method)
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/python/util.py", line 1065, in runWithWarningsSuppressed
    return f(*args, **kwargs)
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/python/test/test_reflectpy3.py", line 290, in test_importExceptions
    reflect.namedAny, "twisted.test.reflect_helper_IE")
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/trial/_synctest.py", line 335, in assertRaises
    failure.Failure().getTraceback()))
twisted.trial.unittest.FailTest: <class 'AttributeError'> raised instead of ImportError:
 Traceback (most recent call last):
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/trial/_synctest.py", line 1216, in _runFixturesAndTest
    if self._run(suppress, todo, method, result):
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/trial/_synctest.py", line 1185, in _run
    runWithWarningsSuppressed(suppress, method)
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/python/util.py", line 1065, in runWithWarningsSuppressed
    return f(*args, **kwargs)
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/python/test/test_reflectpy3.py", line 290, in test_importExceptions
    reflect.namedAny, "twisted.test.reflect_helper_IE")
--- <exception caught here> ---
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/trial/_synctest.py", line 328, in assertRaises
    result = f(*args, **kwargs)
  File "/home/thijs/workspaces/opensource/software/twisted/svn/Twisted/trunk/twisted/python/_reflectpy3.py", line 273, in namedAny
    obj = getattr(obj, n)
builtins.AttributeError: 'module' object has no attribute 'reflect_helper_IE'

Attachments (1)

reflect-6298.patch (1.1 KB) - added by thijs 21 months ago.

Download all attachments as: .zip

Change History (9)

Changed 21 months ago by thijs

comment:1 Changed 21 months ago by thijs

  • Keywords review added
  • Owner changed from thijs to tom.prince

comment:2 Changed 21 months ago by tom.prince

  • Owner tom.prince deleted

This should perhaps have some sort of comment.

comment:3 Changed 21 months ago by thijs

Let me put that in a branch actually so it can be tested (when the 3.3 buildslave is back up).

comment:4 Changed 21 months ago by thijs

  • Author set to thijs
  • Branch set to branches/import-checkstack-6298

(In [37125]) Branching to 'import-checkstack-6298'

comment:5 Changed 21 months ago by thijs

(In [37126]) add note about execName, add news file. refs #6298

comment:6 Changed 21 months ago by thijs

Forced a build. Up for review.

comment:7 Changed 21 months ago by tomprince

(In [37129]) Revert r37124: LookupsTestCase.test_importExceptions failing on python 3.3

test_importExceptions is failing on Python 3.3 only because a statement was
modified to clean up Python 2.3 code which introduced an issue in
test_reflectpy3.LookupsTestCase. This wasn't caught initially because the
buildslave for python 3.3 wass down.

======================================================================
FAIL: test_importExceptions (twisted.python.test.test_reflectpy3.LookupsTestCase)
test_importExceptions


Traceback (most recent call last):

File "twisted/trial/_synctest.py", line 328, in assertRaises

result = f(*args, kwargs)

File "twisted/python/_reflectpy3.py", line 273, in namedAny

obj = getattr(obj, n)

AttributeError: 'module' object has no attribute 'reflect_helper_IE'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "twisted/trial/_synctest.py", line 1185, in _run

runWithWarningsSuppressed(suppress, method)

File "twisted/python/util.py", line 1065, in runWithWarningsSuppressed

return f(*args, kwargs)

File "twisted/python/test/test_reflectpy3.py", line 290, in test_importExceptions

reflect.namedAny, "twisted.test.reflect_helper_IE")

File "software/twisted/svn/Twisted/trunk/twisted/trial/_synctest.py", line 335, in assertRaises

failure.Failure().getTraceback()))

twisted.trial.unittest.FailTest: <class 'AttributeError'> raised instead of ImportError:

Traceback (most recent call last):

File "twisted/trial/_synctest.py", line 1216, in _runFixturesAndTest

if self._run(suppress, todo, method, result):

File "twisted/trial/_synctest.py", line 1185, in _run

runWithWarningsSuppressed(suppress, method)

File "twisted/python/util.py", line 1065, in runWithWarningsSuppressed

return f(*args, kwargs)

File "twisted/python/test/test_reflectpy3.py", line 290, in test_importExceptions

reflect.namedAny, "twisted.test.reflect_helper_IE")

--- <exception caught here> ---

File "twisted/trial/_synctest.py", line 328, in assertRaises

result = f(*args, kwargs)

File "twisted/python/_reflectpy3.py", line 273, in namedAny

obj = getattr(obj, n)

builtins.AttributeError: 'module' object has no attribute 'reflect_helper_IE'

Reopens: #5386
Refs: #6298

comment:8 Changed 21 months ago by thijs

  • Keywords review removed
  • Resolution set to duplicate
  • Status changed from new to closed

Marking this as a duplicate of #5386 and fixing the issue there.

Note: See TracTickets for help on using tickets.