mirror of
				https://github.com/msgpack/msgpack-python.git
				synced 2025-11-04 11:30:57 +00:00 
			
		
		
		
	Fix test
This commit is contained in:
		
							parent
							
								
									dc1b993079
								
							
						
					
					
						commit
						e76091a82c
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -55,9 +55,9 @@ def test_invalidvalue():
 | 
				
			||||||
def test_strict_map_key():
 | 
					def test_strict_map_key():
 | 
				
			||||||
    valid = {u"unicode": 1, b"bytes": 2}
 | 
					    valid = {u"unicode": 1, b"bytes": 2}
 | 
				
			||||||
    packed = packb(valid, use_bin_type=True)
 | 
					    packed = packb(valid, use_bin_type=True)
 | 
				
			||||||
    assert valid == unpackb(packed, raw=True)
 | 
					    assert valid == unpackb(packed, raw=True, strict_map_key=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    invalid = {42: 1}
 | 
					    invalid = {42: 1}
 | 
				
			||||||
    packed = packb(invalid, use_bin_type=True)
 | 
					    packed = packb(invalid, use_bin_type=True)
 | 
				
			||||||
    with raises(ValueError):
 | 
					    with raises(ValueError):
 | 
				
			||||||
        unpackb(packed, raw=True)
 | 
					        unpackb(packed, raw=True, strict_map_key=True)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue