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

Method test_alreadyloaded

Lib/test/test_pkgutil.py:391–399  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

389 del sys.modules['foo']
390
391 def test_alreadyloaded(self):
392 # Ensure that get_data works without reloading - the "loads" module
393 # variable in the example loader should count how many times a reload
394 # occurs.
395 import foo
396 self.assertEqual(foo.loads, 1)
397 self.assertEqual(pkgutil.get_data('foo', 'dummy'), "Hello, world!")
398 self.assertEqual(foo.loads, 1)
399 del sys.modules['foo']
400
401
402# These tests, especially the setup and cleanup, are hideous. They

Callers

nothing calls this directly

Calls 2

assertEqualMethod · 0.45
get_dataMethod · 0.45

Tested by

no test coverage detected