Пример #1
0
    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)
Пример #2
0
    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)
Пример #3
0
    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)
Пример #4
0
    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)