Commit e59d3459 by Ned Batchelder

Use a different arbitrary dotted module, which Christina doesn't already have imported

parent 15894833
...@@ -39,6 +39,9 @@ class TestLazyMod(unittest.TestCase): ...@@ -39,6 +39,9 @@ class TestLazyMod(unittest.TestCase):
self.assertEqual(hsv[0], 0.25) self.assertEqual(hsv[0], 0.25)
def test_dotted(self): def test_dotted(self):
self.assertNotIn("email.utils", sys.modules) # wsgiref is a module with submodules that is not already imported.
email_utils = LazyModule("email.utils") # Any similar module would do. This test demonstrates that the module
self.assertEqual(email_utils.quote('"hi"'), r'\"hi\"') # is not already im
self.assertNotIn("wsgiref.util", sys.modules)
wsgiref_util = LazyModule("wsgiref.util")
self.assertEqual(wsgiref_util.guess_scheme({}), "http")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment