File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 1919from  google .protobuf  import  any_pb2 , descriptor , descriptor_pool , message_factory 
2020
2121import  protovalidate 
22- 
23- # TODO(afuller): Use dynamic descriptor pool based on the FileDescriptorSet 
24- # in the TestConformanceRequest, once the Python protobuf library no longer 
25- # segfaults when using a dynamic descriptor pool. 
2622from  buf .validate .conformance .cases  import  (
2723    bool_pb2 ,  # noqa: F401 
2824    bytes_pb2 ,  # noqa: F401 
@@ -93,10 +89,9 @@ def run_any_test_case(
9389def  run_conformance_test (
9490    request : harness_pb2 .TestConformanceRequest ,
9591) ->  harness_pb2 .TestConformanceResponse :
96-     # pool = descriptor_pool.DescriptorPool() 
97-     # for fd in request.fdset.file: 
98-     #     pool.Add(fd) 
99-     pool  =  descriptor_pool .Default ()
92+     pool  =  descriptor_pool .DescriptorPool ()
93+     for  fd  in  request .fdset .file :
94+         pool .Add (fd )
10095    result  =  harness_pb2 .TestConformanceResponse ()
10196    for  name , tc  in  request .cases .items ():
10297        run_any_test_case (pool , tc , result .results [name ])
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments