STINNER Victor <victor.stin...@haypocalc.com> added the comment:

+        text = PyUnicode_FromFormat(b'repr=%V', 'abcdef', b'abcdef')
+        self.assertEqual(text, 'repr=abcdef')

How do you know which argument is used? For example, you should use instead 
'abc' and b'xyz'.

+        text = PyUnicode_FromFormat(b'repr=%V', None, '人民'.encode('UTF-8'))
+        self.assertEqual(text, 'repr=人民')

I prefer ASCII literals using \x or \u: '\xe4\xba\xe6\xb0\u2018'.

You should also add a test specific to the replace error handler, e.g. (None, 
b'abc\xff') => 'abc\ufffd'.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11246>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to