@@ -24,6 +24,7 @@ class TypeExportSuite(DataSuite):
2424 def run_case (self , testcase : DataDrivenTestCase ) -> None :
2525 error = False
2626 src = "\n " .join (testcase .input )
27+ is_meta = testcase .name .endswith ("_meta" )
2728 try :
2829 options = Options ()
2930 options .use_builtins_fixtures = True
@@ -50,10 +51,10 @@ def run_case(self, testcase: DataDrivenTestCase) -> None:
5051 "__future__" ,
5152 "typing_extensions" ,
5253 "sys" ,
54+ "collections" ,
5355 ):
5456 continue
5557 fnam = os .path .join (cache_dir , f"{ module } .data.ff" )
56- is_meta = testcase .name .endswith ("_meta" )
5758 if not is_meta :
5859 with open (fnam , "rb" ) as f :
5960 json_data = convert_binary_cache_to_json (f .read (), implicit_names = False )
@@ -81,6 +82,15 @@ def run_case(self, testcase: DataDrivenTestCase) -> None:
8182 a = e .messages
8283 error = True
8384 if error or "\n " .join (testcase .output ).strip () != "<not checked>" :
85+ if is_meta and sys .platform == "win32" :
86+ out = filter_platform_specific (testcase .output )
87+ a = filter_platform_specific (a )
88+ else :
89+ out = testcase .output
8490 assert_string_arrays_equal (
85- testcase . output , a , f"Invalid output ({ testcase .file } , line { testcase .line } )"
91+ out , a , f"Invalid output ({ testcase .file } , line { testcase .line } )"
8692 )
93+
94+
95+ def filter_platform_specific (lines : list [str ]) -> list [str ]:
96+ return [l for l in lines if '"size":' not in l and '"hash":' not in l ]
0 commit comments