Test failure with Python 3.2

Bug #1216246 reported by Arfrever Frehtes Taifersar Arahesis on 2013-08-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subunit
High
Robert Collins

Bug Description

subunit-0.0.14 introduced 1 test failure with Python 3.2. This failure does not occur with Python 3.3.

$ PYTHONPATH="python" python3.2 -m testtools.run subunit.test_suite
Tests running...
======================================================================
FAIL: subunit.tests.test_test_protocol2.TestByteStreamToStreamResult.test_NULL_in_string
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/python-subunit-0.0.14/python/subunit/tests/test_test_protocol2.py", line 400, in test_NULL_in_string
    file_bytes=b'UTF8 string at offset 2 contains NUL byte'),
  File "/tmp/python-subunit-0.0.14/python/subunit/tests/test_test_protocol2.py", line 305, in check_events
    self.assertEqual(events, result._events)
  File "/usr/lib64/python3.2/site-packages/testtools/testcase.py", line 322, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib64/python3.2/site-packages/testtools/testcase.py", line 417, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
testtools.matchers._impl.MismatchError: !=:
reference = [('status',
  'subunit.parser',
  None,
  None,
  True,
  'Packet data',
  b'\xb3-\x03\x13\x03b\x00r\x06source\xd7A\xac\xfe',
  True,
  None,
  None,
  None),
 ('status',
  'subunit.parser',
  'fail',
  None,
  True,
  'Parser Error',
  b'UTF8 string at offset 2 contains NUL byte',
  True,
  None,
  None,
  None)]
actual = [('status',
  'b\x00r',
  'success',
  None,
  True,
  None,
  None,
  False,
  None,
  'source',
  None)]

Ran 307 tests in 1.504s
FAILED (failures=1)

Robert Collins (lifeless) wrote :

Thanks for reporting this - I can't reproduce in 0.0.15. this -might- be a duplicate bug 1216163

Changed in subunit:
status: New → Incomplete

I can still reproduce this error in subunit 0.0.15.

Which version of Python 3.2 have you tried?
I use Python 3.2.5.

The same failure occurs also with Python 3.1 (3.1.5).

Robert Collins (lifeless) wrote :

broken venv, I can reproduce now - will fix shortly. Thanks!

Robert Collins (lifeless) wrote :

The impact of this bug is that a corrupted/bad packet may parse inappropriately, leading to an invalid unicode string being handed to the client. Valid packets will parse correctly and output is not affected.

Changed in subunit:
status: Incomplete → Triaged
importance: Undecided → High
Changed in subunit:
milestone: none → next
status: Triaged → Fix Committed
assignee: nobody → Robert Collins (lifeless)
Changed in subunit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers