add skip test__bytes__ before cpython 3.11
-from testutils import assert_raises
+from testutils import assert_raises, skip_if_unsupported
# new
assert bytes([1, 2, 3])
@@ -616,6 +616,7 @@ assert b'rust%bpython%b' % (b' ', b'!') == b'rust python!'
assert b'x=%i y=%f' % (1, 2.5) == b'x=1 y=2.500000'
# __bytes__
+def test__bytes__():
foo = b'foo\x00bar'
assert foo.__bytes__() == foo
assert type(foo.__bytes__()) == bytes
@@ -666,3 +667,5 @@ class B1(bytearray):
return me
b = B1.fromhex('a0a1a2')
assert b.foo == 'bar'
+
+skip_if_unsupported(3,11,test__bytes__)
\ No newline at end of file
