test failures on windows w/python 2.6

Bug #689858 reported by Robert Collins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Fix Released
Critical
Martin Packman

Bug Description

======================================================================
FAIL: testtools.tests.test_testresult.TestNonAsciiResultsWithUnittest.test_unprintable_exception
----------------------------------------------------------------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "testtools\runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "testtools\testcase.py", line 499, in _run_test_method
    return self._get_test_method()()
  File "testtools\tests\test_testresult.py", line 1240, in test_unprintable_exception
    textoutput)
  File "testtools\testcase.py", line 275, in assertIn
    needle in haystack, '%r not in %r' % (needle, haystack))
AssertionError: 'UnprintableError: <unprintable UnprintableError object>\n' not in 'E\n=============
=========================================================\nERROR: test_unprintable_exception.Test.ru
nTest\n----------------------------------------------------------------------\n_StringException: Tex
t attachment: traceback\n------------\nTraceback (most recent call last):\n File "testtools\\runtes
t.py", line 169, in _run_user\n return fn(*args, **kwargs)\n File "testtools\\testcase.py", line
 499, in _run_test_method\n return self._get_test_method()()\n File "c:\\users\\jameinel\\appdat
a\\local\\temp\\TestNonAsciiResultsWithUnittest6rm7fc\\test_unprintable_exception.py", line 11, in r
unTest\n raise UnprintableError\nUnprintableError\n------------\n\n\n----------------------------
------------------------------------------\nRan 1 test in 0.001s\n\nFAILED (errors=1)\n'
------------

sometimes testtools.tests.test_testresult.TestNonAsciiResults.test_unprintable_exception fails too

Related branches

Revision history for this message
Robert Collins (lifeless) wrote :

John Meinel says that python2.5 works fine.

Changed in testtools:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Martin Packman (gz) wrote :

Have a hunch this might be twisted tests interfering somehow, but as I wrote the one that's failing I would say that wouldn't I.

Revision history for this message
Martin Packman (gz) wrote :

The blame here is a misguided BaseException.__unicode__ method added in Python 2.6 :
<http://bugs.python.org/issue2517>

This was then backed out again for 2.6.5:
<http://bugs.python.org/issue6108>

This test just needs stringification to fail, so providing its own unicode method avoids this incompatibility.

Changed in testtools:
status: Triaged → Fix Committed
Changed in testtools:
milestone: none → next
assignee: nobody → Martin [gz] (gz)
Changed in testtools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.