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

Method test_6

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

Source from the content-addressed store, hash-verified

209 '__package__', '__spec__', 'spam'])
210
211 def test_6(self):
212 hier = [
213 ("t6", None),
214 ("t6 __init__.py",
215 "__all__ = ['spam', 'ham', 'eggs']"),
216 ("t6 spam.py", ""),
217 ("t6 ham.py", ""),
218 ("t6 eggs.py", ""),
219 ]
220 self.mkhier(hier)
221
222 import t6
223 self.assertEqual(fixdir(dir(t6)),
224 ['__all__', '__doc__', '__file__', '__loader__',
225 '__name__', '__package__', '__path__', '__spec__'])
226 s = """
227 import t6
228 from t6 import *
229 self.assertEqual(fixdir(dir(t6)),
230 ['__all__', '__doc__', '__file__',
231 '__loader__', '__name__', '__package__',
232 '__path__', '__spec__', 'eggs', 'ham', 'spam'])
233 self.assertEqual(dir(), ['eggs', 'ham', 'self', 'spam', 't6'])
234 """
235 self.run_code(s)
236
237 def test_7(self):
238 hier = [

Callers

nothing calls this directly

Calls 4

mkhierMethod · 0.95
run_codeMethod · 0.95
fixdirFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected