File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66from pathlib import Path
77from unittest .mock import patch
88
9- from test .test_tools import skip_if_missing , imports_under_tool
9+ from test .support import os_helper
10+ from test .test_tools import basepath , skip_if_missing , imports_under_tool
1011
1112skip_if_missing ("build" )
1213
1516 compute_changes = importlib .import_module ("compute-changes" )
1617
1718process_changed_files = compute_changes .process_changed_files
19+ is_fuzzable_library_file = compute_changes .is_fuzzable_library_file
1820Outputs = compute_changes .Outputs
1921ANDROID_DIRS = compute_changes .ANDROID_DIRS
2022IOS_DIRS = compute_changes .IOS_DIRS
@@ -45,16 +47,16 @@ def test_docs(self):
4547 self .assertFalse (result .run_tests )
4648
4749 def test_ci_fuzz_stdlib (self ):
48- for p in LIBRARY_FUZZER_PATHS :
49- with self . subTest ( p = p ) :
50- if p . is_dir ( ):
51- f = p / "file"
52- elif p . is_file ():
53- f = p
54- else :
55- continue
56- result = process_changed_files ({ f } )
57- self .assertTrue (result . run_ci_fuzz_stdlib )
50+ with os_helper . change_cwd ( basepath ) :
51+ for p in LIBRARY_FUZZER_PATHS :
52+ with self . subTest ( p = p ):
53+ if p . is_dir ():
54+ f = p / "file"
55+ elif p . is_file ():
56+ f = p
57+ result = process_changed_files ({ f })
58+ self . assertTrue ( result . run_ci_fuzz_stdlib )
59+ self .assertTrue (is_fuzzable_library_file ( f ) )
5860
5961 def test_android (self ):
6062 for d in ANDROID_DIRS :
You can’t perform that action at this time.
0 commit comments