mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 11:49:12 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									5a49ade70e
								
							
						
					
					
						commit
						c636f565b4
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -1442,6 +1442,10 @@ def inherits():
 | 
				
			||||||
    #XXX verify(str(s) == "12345")
 | 
					    #XXX verify(str(s) == "12345")
 | 
				
			||||||
    verify(str(s).__class__ is str)
 | 
					    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):
 | 
					    class madunicode(unicode):
 | 
				
			||||||
        _rev = None
 | 
					        _rev = None
 | 
				
			||||||
        def rev(self):
 | 
					        def rev(self):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue