Exemple #1
0
 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()
Exemple #2
0
 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
Exemple #3
0
 def setUp(self) -> None:
     self.project = Project()
     self.module = Module(self.project, InputDirectory("."))
Exemple #4
0
 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)
Exemple #5
0
 def setUp(self) -> None:
     self.project = Project(config={"debug": False})
     self.module = Module(self.project, InputDirectory("."))