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

Function setup_module

IPython/utils/tests/test_module_paths.py:43–55  ·  view source on GitHub ↗

Setup testenvironment for the module:

()

Source from the content-addressed store, hash-verified

41
42
43def setup_module():
44 """Setup testenvironment for the module:
45
46 """
47 # Do not mask exceptions here. In particular, catching WindowsError is a
48 # problem because that exception is only defined on Windows...
49 os.makedirs(join(TMP_TEST_DIR, "xmod"))
50 os.makedirs(join(TMP_TEST_DIR, "nomod"))
51 make_empty_file(join(TMP_TEST_DIR, "xmod/__init__.py"))
52 make_empty_file(join(TMP_TEST_DIR, "xmod/sub.py"))
53 make_empty_file(join(TMP_TEST_DIR, "pack.py"))
54 make_empty_file(join(TMP_TEST_DIR, "packpyc.pyc"))
55 sys.path = [TMP_TEST_DIR]
56
57def teardown_module():
58 """Teardown testenvironment for the module:

Callers

nothing calls this directly

Calls 1

make_empty_fileFunction · 0.85

Tested by

no test coverage detected