]> granicus.if.org Git - python/commitdiff
Added another test of str() applied to a string subclass instance,
authorTim Peters <tim.peters@gmail.com>
Tue, 11 Sep 2001 01:52:02 +0000 (01:52 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 11 Sep 2001 01:52:02 +0000 (01:52 +0000)
involving embedded null bytes, since it's possible to screw that up w/o
screwing up cases w/o embedded nulls.

Lib/test/test_descr.py

index 0de4dec078ec00cb6a419bfbaa4923b798859901..fea32550ca171e6f43ddd4b03c28e186433eb8a5 100644 (file)
@@ -1442,6 +1442,10 @@ def inherits():
     #XXX verify(str(s) == "12345")
     verify(str(s).__class__ is str)
 
+    s = madstring("\x00" * 5)
+    #XXX verify(str(s) == "\x00" ( 5)
+    verify(str(s).__class__ is str)
+
     class madunicode(unicode):
         _rev = None
         def rev(self):