def test_module(self): project = Project() project.config["debug_files"] = True module = Module(project, FakeInputDirectory("/")) self.assertEqual(module.project, project) self.assertEqual(module.debug_files, True) module.process()
def load_module(self): if os.path.isdir(self.full_path): input_files = InputDirectory(self.full_path) elif os.path.isfile(self.full_path): input_files = SingleFile(self.full_path) module = Module(self, input_files) module.process() return module
def setUp(self) -> None: self.project = Project() self.module = Module(self.project, InputDirectory("."))
def test_source_file(self): project = Project() module = Module(project, FakeInputDirectory("/")) combine = Combiner(project, module, FakeInputFile("foo.c")) self.assertEqual(combine.source.full_path, "foo.c") self.assertEqual(project.name, combine.project.name)
def setUp(self) -> None: self.project = Project(config={"debug": False}) self.module = Module(self.project, InputDirectory("."))