MCPcopy Index your code
hub / github.com/python/cpython / test_4

Method test_4

Lib/test/test_pkg.py:162–181  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

160 self.assertEqual(t3.sub.subsub.__name__, "t3.sub.subsub")
161
162 def test_4(self):
163 hier = [
164 ("t4.py", "raise RuntimeError('Shouldnt load t4.py')"),
165 ("t4", None),
166 ("t4 __init__.py", ""),
167 ("t4 sub.py", "raise RuntimeError('Shouldnt load sub.py')"),
168 ("t4 sub", None),
169 ("t4 sub __init__.py", ""),
170 ("t4 sub subsub.py",
171 "raise RuntimeError('Shouldnt load subsub.py')"),
172 ("t4 sub subsub", None),
173 ("t4 sub subsub __init__.py", "spam = 1"),
174 ]
175 self.mkhier(hier)
176
177 s = """
178 from t4.sub.subsub import *
179 self.assertEqual(spam, 1)
180 """
181 self.run_code(s)
182
183 def test_5(self):
184 hier = [

Callers

nothing calls this directly

Calls 2

mkhierMethod · 0.95
run_codeMethod · 0.95

Tested by

no test coverage detected