mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	Add test for SF bug # 575229, multiple inheritance w/ slots dumps core
Fix already checked in by Guido
This commit is contained in:
		
							parent
							
								
									a87a521b83
								
							
						
					
					
						commit
						f9dd0f1924
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
					@ -3237,6 +3237,16 @@ def slottrash():
 | 
				
			||||||
        o = trash(o)
 | 
					        o = trash(o)
 | 
				
			||||||
    del o
 | 
					    del o
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def slotmultipleinheritance():
 | 
				
			||||||
 | 
					    # SF bug 575229, multiple inheritance w/ slots dumps core
 | 
				
			||||||
 | 
					    class A(object):
 | 
				
			||||||
 | 
					        __slots__=()
 | 
				
			||||||
 | 
					    class B(object):
 | 
				
			||||||
 | 
					        pass
 | 
				
			||||||
 | 
					    class C(A,B) :
 | 
				
			||||||
 | 
					        __slots__=()
 | 
				
			||||||
 | 
					    C().x=2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def testrmul():
 | 
					def testrmul():
 | 
				
			||||||
    # SF patch 592646
 | 
					    # SF patch 592646
 | 
				
			||||||
    if verbose:
 | 
					    if verbose:
 | 
				
			||||||
| 
						 | 
					@ -3344,6 +3354,7 @@ def test_main():
 | 
				
			||||||
    slices()
 | 
					    slices()
 | 
				
			||||||
    subtype_resurrection()
 | 
					    subtype_resurrection()
 | 
				
			||||||
    slottrash()
 | 
					    slottrash()
 | 
				
			||||||
 | 
					    slotmultipleinheritance()
 | 
				
			||||||
    testrmul()
 | 
					    testrmul()
 | 
				
			||||||
    if verbose: print "All OK"
 | 
					    if verbose: print "All OK"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue