MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_6

Method test_6

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected