We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55e8227 commit 956817cCopy full SHA for 956817c
tests/test_future/test_bytes.py
@@ -29,6 +29,16 @@ def test_bytes_encoding_arg(self):
29
b = bytes(u, encoding='utf-8')
30
self.assertEqual(b, u.encode('utf-8'))
31
32
+ def test_bytes_encoding_arg_issue_193(self):
33
+ """
34
+ This used to be True: bytes(str(u'abc'), 'utf8') == b"b'abc'"
35
36
+ u = u'abc'
37
+ b = bytes(str(u), 'utf8')
38
+ self.assertNotEqual(b, b"b'abc'")
39
+ self.assertEqual(b, b'abc')
40
+ self.assertEqual(b, bytes(b'abc'))
41
+
42
def test_bytes_encoding_arg_non_kwarg(self):
43
"""
44
As above, but with a positional argument
0 commit comments