~~~~~~~~~
* Subunit v2 packets with both file content and route code were not being
parsed correctly - they would incorrectly emit a parser error, due to trying
to parse the route code length from the first byes of the file content.
(Robert Collins,
1172815)
NEXT (In development)
---------------------
+BUG FIXES
+~~~~~~~~~
+
+* Subunit v2 packets with both file content and route code were not being
+ parsed correctly - they would incorrectly emit a parser error, due to trying
+ to parse the route code length from the first byes of the file content.
+ (Robert Collins, 1172815)
+
0.0.11
------
b'packet: claimed 63 bytes, 10 available'),
])
+ def test_route_code_and_file_content(self):
+ content = BytesIO()
+ subunit.StreamResultToBytes(content).status(
+ route_code='0', mime_type='text/plain', file_name='bar',
+ file_bytes=b'foo')
+ self.check_event(content.getvalue(), test_id=None, file_name='bar',
+ route_code='0', mime_type='text/plain', file_bytes=b'foo')
+
def test_suite():
loader = subunit.tests.TestUtil.TestLoader()
raise ParseError('File content extends past end of packet: '
'claimed %d bytes, %d available' % (
content_length, len(file_bytes)))
+ pos += content_length
else:
file_name = None
file_bytes = None