Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c636f56

Browse files
committed
Added another test of str() applied to a string subclass instance,
involving embedded null bytes, since it's possible to screw that up w/o screwing up cases w/o embedded nulls.
1 parent 5a49ade commit c636f56

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_descr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,6 +1442,10 @@ def rev(self):
14421442
#XXX verify(str(s) == "12345")
14431443
verify(str(s).__class__ is str)
14441444

1445+
s = madstring("\x00" * 5)
1446+
#XXX verify(str(s) == "\x00" ( 5)
1447+
verify(str(s).__class__ is str)
1448+
14451449
class madunicode(unicode):
14461450
_rev = None
14471451
def rev(self):

0 commit comments

Comments
 (0)