Exemplo n.º 1
0
    def test_replaces_old_module_objects_with_new_ones_during_create_module(self):
        paths = ["module.py", P("sub/dir/module.py"), P("other/module.py")]
        project = ProjectWithModules(paths)

        new_module = project.create_module(P("other/module.py"))

        assert_length(project.get_modules(), 3)
        assert project[P("other/module.py")] is new_module
Exemplo n.º 2
0
    def test_replaces_old_module_objects_with_new_ones_during_create_module(
            self):
        paths = ["module.py", P("sub/dir/module.py"), P("other/module.py")]
        project = ProjectWithModules(paths)

        new_module = project.create_module(P("other/module.py"))

        assert_length(project.get_modules(), 3)
        assert project[P("other/module.py")] is new_module