Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 223cc65

Browse files
committed
misc coverage
1 parent 833cf4c commit 223cc65

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

IPython/core/tests/test_magic.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,13 +1339,11 @@ def find_spec(self, fullname, path, target=None):
13391339
return importlib.util.spec_from_loader(fullname, self)
13401340

13411341
def get_filename(self, fullname):
1342-
if fullname != "my_tmp":
1343-
raise ImportError(f"unexpected module name '{fullname}'")
1342+
assert fullname == "my_tmp":
13441343
return fullpath
13451344

13461345
def get_data(self, path):
1347-
if not Path(path).samefile(fullpath):
1348-
raise OSError(f"expected path '{fullpath}', got '{path}'")
1346+
assert Path(path).samefile(fullpath):
13491347
return Path(fullpath).read_text()
13501348

13511349
sys.meta_path.insert(0, MyTempImporter())

0 commit comments

Comments
 (0)