← Back to team overview

testtools-dev team mailing list archive

[Bug 666151] Re: Tests of 0.9.7 fail with Python 3.1

 

** Branch linked:
lp:~gz/testtools/fix_test_outcome_Extended_py27_no_reason_666151

-- 
Tests of 0.9.7 fail with Python 3.1
https://bugs.launchpad.net/bugs/666151
You received this bug notification because you are a member of testtools
developers, which is subscribed to testtools.

Status in testtools: In Progress
Status in Gentoo Linux: Confirmed

Bug description:
As you can see, Python 2.6.5 runs perfectly fine, while Python 3.1.2 fails.

 * Testing of dev-python/testtools-0.9.7 with CPython 2.6...
Tests running...
Ran 362 tests in 0.387s

OK
 * Testing of dev-python/testtools-0.9.7 with CPython 3.1...
Tests running...
======================================================================
ERROR: testtools.tests.test_testresult.TestExtendedToOriginalAddSkip.test_outcome_Extended_py27_no_reason
----------------------------------------------------------------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "testtools/testresult/real.py", line 423, in addSkip
    return addSkip(test, details=details)
TypeError: addSkip() got an unexpected keyword argument 'details'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "testtools/runtest.py", line 144, in _run_user
    return fn(*args)
  File "testtools/testcase.py", line 487, in _run_test_method
    testMethod()
  File "testtools/tests/test_testresult.py", line 816, in test_outcome_Extended_py27_no_reason
    {'reason': Content(UTF8_TEXT, lambda:['foo'])})
  File "testtools/tests/test_testresult.py", line 583, in check_outcome_details_to_arg
    getattr(self.converter, outcome)(self, details=details)
  File "testtools/testresult/real.py", line 427, in addSkip
    reason = ''.join(details['reason'].iter_text())
  File "testtools/content.py", line 60, in _iter_text
    yield decoder.decode(bytes)
  File "/usr/lib/python3.1/codecs.py", line 299, in decode
    data = self.buffer + input
TypeError: can't concat bytes to str
------------
Ran 362 tests in 0.911s





References