We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea0453e commit 8ada7a9Copy full SHA for 8ada7a9
Lib/test/test_importlib/import_/test_path.py
@@ -158,11 +158,15 @@ def test_deleted_cwd(self):
158
def test_permission_error_cwd(self):
159
# gh-115911: Test that an unreadable CWD does not break imports, in
160
# particular during early stages of interpreter startup.
161
+
162
+ def noop_hook(*args):
163
+ raise ImportError
164
165
with (
166
os_helper.temp_dir() as new_dir,
167
os_helper.save_mode(new_dir),
168
os_helper.change_cwd(new_dir),
- util.import_state(path=['']),
169
+ util.import_state(path=[''], path_hooks=[noop_hook]),
170
):
171
# chmod() is done here (inside the 'with' block) because the order
172
# of teardown operations cannot be the reverse of setup order. See
0 commit comments