summaryrefslogtreecommitdiff
path: root/python/subunit/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@jelmer.uk>2023-01-28 15:20:09 +0000
committerJelmer Vernooij <jelmer@jelmer.uk>2023-01-28 15:38:45 +0000
commitf315464df26e4122758da26f40a76aa19a08ff60 (patch)
tree91d4a4065db30bda341e9ff74130f12d7a2ffee6 /python/subunit/tests
parent9200d9eeff3d624d592d01d618ad30f02dc68afd (diff)
downloadsubunit-git-f315464df26e4122758da26f40a76aa19a08ff60.tar.gz
Drop compatibility wrappers for memoryview in older Python versions
Diffstat (limited to 'python/subunit/tests')
-rw-r--r--python/subunit/tests/test_subunit_tags.py2
-rw-r--r--python/subunit/tests/test_test_protocol2.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/python/subunit/tests/test_subunit_tags.py b/python/subunit/tests/test_subunit_tags.py
index 3722eb2..936a3c7 100644
--- a/python/subunit/tests/test_subunit_tags.py
+++ b/python/subunit/tests/test_subunit_tags.py
@@ -67,7 +67,7 @@ class TestSubUnitTags(testtools.TestCase):
self.original.seek(0)
self.assertEqual(
0, subunit.tag_stream(self.original, self.filtered, ["quux"]))
- self.assertThat(reference, Contains(self.filtered.getvalue()))
+ self.assertThat(reference, Contains(bytes(self.filtered.getvalue())))
def test_remove_tag(self):
reference = BytesIO()
diff --git a/python/subunit/tests/test_test_protocol2.py b/python/subunit/tests/test_test_protocol2.py
index bbf510e..0b40929 100644
--- a/python/subunit/tests/test_test_protocol2.py
+++ b/python/subunit/tests/test_test_protocol2.py
@@ -312,10 +312,10 @@ class TestByteStreamToStreamResult(TestCase):
source, non_subunit_name="stdout").run(result)
self.assertEqual(b'', source.read())
self.assertEqual(events, result._events)
- #- any file attachments should be byte contents [as users assume that].
+ #- any file attachments should be bytes equivalent [as users assume that].
for event in result._events:
if event[5] is not None:
- self.assertIsInstance(event[6], bytes)
+ bytes(event[6])
def check_event(self, source_bytes, test_status=None, test_id="foo",
route_code=None, timestamp=None, tags=None, mime_type=None,