MCPcopy Create free account
hub / github.com/ipython/ipython / teardown_module

Function teardown_module

IPython/utils/tests/test_module_paths.py:57–67  ·  view source on GitHub ↗

Teardown testenvironment for the module: - Remove tempdir - restore sys.path

()

Source from the content-addressed store, hash-verified

55 sys.path = [TMP_TEST_DIR]
56
57def teardown_module():
58 """Teardown testenvironment for the module:
59
60 - Remove tempdir
61 - restore sys.path
62 """
63 # Note: we remove the parent test dir, which is the root of all test
64 # subdirs we may have created. Use shutil instead of os.removedirs, so
65 # that non-empty directories are all recursively removed.
66 shutil.rmtree(TMP_TEST_DIR)
67 sys.path = old_syspath
68
69def test_tempdir():
70 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected