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