File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,28 @@ class ParseTestCase(unittest.TestCase):
155155    Test parsing various signatures. 
156156    """ 
157157
158+     @given ( 
159+         strategies .tuples ( 
160+             dbus_signatures ( 
161+                 min_complete_types = 1 , 
162+                 max_complete_types = 1 , 
163+                 exclude_arrays = True , 
164+                 exclude_dicts = True , 
165+                 exclude_structs = True , 
166+                 blacklist = "v" , 
167+             ), 
168+             dbus_signatures (min_complete_types = 1 , max_complete_types = 1 ), 
169+         ) 
170+     ) 
171+     @settings (max_examples = 5 ) 
172+     def  test_empty_dict (self , strat ):
173+         """ 
174+         Test parsing an empty dict with a valid signature. 
175+         """ 
176+         (key_sig , value_sig ) =  strat 
177+         sig  =  f"{ key_sig } { value_sig }  
178+         self .assertEqual (signature (dbus .Dictionary (signature = sig )), "a{"  +  sig  +  "}" )
179+ 
158180    @given ( 
159181        dbus_signatures ( 
160182            min_complete_types = 1 , max_complete_types = 1 , blacklist = "h"  
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments