File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 2525from mypyc .test .testutil import (
2626 ICODE_GEN_BUILTINS , TESTUTIL_PATH ,
2727 use_custom_builtins , MypycDataSuite , assert_test_output ,
28- show_c
28+ show_c , fudge_dir_mtimes ,
2929)
3030from mypyc .test .test_serialization import check_serialization_roundtrip
3131
@@ -99,15 +99,6 @@ def chdir_manager(target: str) -> Iterator[None]:
9999 os .chdir (dir )
100100
101101
102- def fudge_dir_mtimes (dir : str , delta : int ) -> None :
103- for dirpath , _ , filenames in os .walk (dir ):
104- for name in filenames :
105- # if name.endswith(('.c', '.h')): continue
106- path = os .path .join (dirpath , name )
107- new_mtime = os .stat (path ).st_mtime + delta
108- os .utime (path , times = (new_mtime , new_mtime ))
109-
110-
111102class TestRun (MypycDataSuite ):
112103 """Test cases that build a C extension and run code."""
113104 files = files
Original file line number Diff line number Diff line change @@ -195,3 +195,11 @@ def show_c(cfiles: List[List[Tuple[str, str]]]) -> None:
195195 print ('== {} ==' .format (cfile ))
196196 print_with_line_numbers (ctext )
197197 heading ('End C' )
198+
199+
200+ def fudge_dir_mtimes (dir : str , delta : int ) -> None :
201+ for dirpath , _ , filenames in os .walk (dir ):
202+ for name in filenames :
203+ path = os .path .join (dirpath , name )
204+ new_mtime = os .stat (path ).st_mtime + delta
205+ os .utime (path , times = (new_mtime , new_mtime ))
You can’t perform that action at this time.
0 commit comments