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

Method test_basics

Lib/test/test_import/__init__.py:1390–1399  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1388 return sys.modules[self.module_name]
1389
1390 def test_basics(self):
1391 mod = self.import_module()
1392 self.assertEqual(mod.module_filename, self.file_name)
1393 self.assertEqual(mod.code_filename, self.file_name)
1394 self.assertEqual(mod.func_filename, self.file_name)
1395 del sys.modules[self.module_name]
1396 mod = self.import_module()
1397 self.assertEqual(mod.module_filename, self.file_name)
1398 self.assertEqual(mod.code_filename, self.file_name)
1399 self.assertEqual(mod.func_filename, self.file_name)
1400
1401 def test_incorrect_code_name(self):
1402 py_compile.compile(self.file_name, dfile="another_module.py")

Callers

nothing calls this directly

Calls 2

import_moduleMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected