Tests of 0.9.7 fail with Python 3.1

Bug #666151 reported by Christian Faulhammer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Fix Released
Critical
Martin Packman
Gentoo Linux
Fix Released
Medium

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

Related branches

Revision history for this message
Jonathan Lange (jml) wrote :

Thanks for the report. Will try to fix as soon as possible.

In the meantime, I'd welcome any tips you've got on I can run tests against every Python out there.

Changed in testtools:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Christian Faulhammer (fauli) wrote :

If I understand you correctly you want to have those tests automated on different versions? I would recommend latest 2.x and 3.x versions, in Gentoo we have a set up that allows building for multible ABIs in parallel, we got that error on automated test runs of the tree (tinderboxing).

Changed in gentoo:
status: Unknown → Confirmed
Revision history for this message
Martin Packman (gz) wrote :

I was getting more failures as well, but turned out my local 3.2 version was in a slightly broken intermediate state from Victor Stinner's encoding work, head is fine apart from this.

Changed in testtools:
assignee: nobody → Martin [gz] (gz)
status: Triaged → In Progress
Jonathan Lange (jml)
Changed in testtools:
status: In Progress → Fix Committed
milestone: none → next
Changed in testtools:
importance: High → Critical
Changed in testtools:
status: Fix Committed → Fix Released
Changed in gentoo:
status: Confirmed → Fix Released
Changed in gentoo:
importance: Unknown → Medium
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.