From 691cde99a8f3b0ffa8837c3ca5055a6c35eea6ce 2021-10-23 12:01:15 From: Samuel Gaist Date: 2021-10-23 12:01:15 Subject: [PATCH] [utils][tests][module_paths] Remove nose --- diff --git a/IPython/utils/tests/test_module_paths.py b/IPython/utils/tests/test_module_paths.py index ef2841b..1267999 100644 --- a/IPython/utils/tests/test_module_paths.py +++ b/IPython/utils/tests/test_module_paths.py @@ -22,8 +22,6 @@ from IPython.testing.tools import make_tempfile import IPython.utils.module_paths as mp -import nose.tools as nt - TEST_FILE_PATH = Path(__file__).resolve().parent TMP_TEST_DIR = Path(tempfile.mkdtemp(suffix="with.dot")) @@ -67,7 +65,7 @@ def test_tempdir(): """ Ensure the test are done with a temporary file that have a dot somewhere. """ - nt.assert_in(".", str(TMP_TEST_DIR)) + assert "." in str(TMP_TEST_DIR) def test_find_mod_1(): @@ -76,7 +74,7 @@ def test_find_mod_1(): Expected output: a path to that directory's __init__.py file. """ modpath = TMP_TEST_DIR / "xmod" / "__init__.py" - nt.assert_equal(Path(mp.find_mod("xmod")), modpath) + assert Path(mp.find_mod("xmod")) == modpath def test_find_mod_2(): """ @@ -85,7 +83,7 @@ def test_find_mod_2(): TODO: Confirm why this is a duplicate test. """ modpath = TMP_TEST_DIR / "xmod" / "__init__.py" - nt.assert_equal(Path(mp.find_mod("xmod")), modpath) + assert Path(mp.find_mod("xmod")) == modpath def test_find_mod_3(): """ @@ -93,7 +91,7 @@ def test_find_mod_3(): Expected output: full path with .py extension. """ modpath = TMP_TEST_DIR / "xmod" / "sub.py" - nt.assert_equal(Path(mp.find_mod("xmod.sub")), modpath) + assert Path(mp.find_mod("xmod.sub")) == modpath def test_find_mod_4(): """ @@ -101,11 +99,11 @@ def test_find_mod_4(): Expected output: full path with .py extension """ modpath = TMP_TEST_DIR / "pack.py" - nt.assert_equal(Path(mp.find_mod("pack")), modpath) + assert Path(mp.find_mod("pack")) == modpath def test_find_mod_5(): """ Search for a filename with a .pyc extension Expected output: TODO: do we exclude or include .pyc files? """ - nt.assert_equal(mp.find_mod("packpyc"), None) + assert mp.find_mod("packpyc") == None