Show More
@@ -1339,13 +1339,11 b' def test_run_module_from_import_hook():' | |||
|
1339 | 1339 | return importlib.util.spec_from_loader(fullname, self) |
|
1340 | 1340 | |
|
1341 | 1341 | def get_filename(self, fullname): |
|
1342 |
|
|
|
1343 | raise ImportError(f"unexpected module name '{fullname}'") | |
|
1342 | assert fullname == "my_tmp": | |
|
1344 | 1343 | return fullpath |
|
1345 | 1344 | |
|
1346 | 1345 | def get_data(self, path): |
|
1347 |
|
|
|
1348 | raise OSError(f"expected path '{fullpath}', got '{path}'") | |
|
1346 | assert Path(path).samefile(fullpath): | |
|
1349 | 1347 | return Path(fullpath).read_text() |
|
1350 | 1348 | |
|
1351 | 1349 | sys.meta_path.insert(0, MyTempImporter()) |
General Comments 0
You need to be logged in to leave comments.
Login now