def test_load_module__should_succeed_for_existing_module(self): module_name = "behave.textutil" self.theory.ensure_module_is_not_imported(module_name) module = LazyObject.load_module(module_name) self.theory.assert_module_with_name(module, module_name) self.theory.assert_module_is_imported(module_name)
def test_load_module__should_succeed_for_already_imported_module(self): module_name = "behave.importer" self.theory.assert_module_is_imported(module_name) module = LazyObject.load_module(module_name) self.theory.assert_module_with_name(module, module_name) self.theory.assert_module_is_imported(module_name)