def test_opt_chth_premacro(self): self.chth_prep = CheetahPrep(self.pname, self.argname, self.section, pre_mname=self.pre_mname) self.exp_chth = "#include source=$PRE_MACRO_TEST#" self.assertEqual(self.chth_prep.chth, self.exp_chth)
def test_opt_chth_bool(self): self.chth_prep = CheetahPrep(self.pname, self.argname, self.section, is_bool=True) self.exp_chth = "#if $common.test_arg\n $common.test_arg\n#end if\n" self.assertEqual(self.chth_prep.chth, self.exp_chth)
def test_req_chth_bool(self): self.chth_prep = CheetahPrep(self.pname, self.argname, "required", is_req=True, is_bool=True) self.exp_chth = "$test_arg" self.assertEqual(self.chth_prep.chth, self.exp_chth)
def test_req_chth_premacro(self): self.chth_prep = CheetahPrep(self.pname, self.argname, "required", True, pre_mname=self.pre_mname) self.exp_chth = "#include source=$PRE_MACRO_TEST#" self.assertEqual(self.chth_prep.chth, self.exp_chth)
def test_opt_chth(self): self.chth_prep = CheetahPrep(self.pname, self.argname, self.section) self.exp_chth = "#if $common.test_arg\n --test-arg $common.test_arg\n#end if\n" self.assertEqual(self.chth_prep.chth, self.exp_chth)
def test_req_chth(self): self.chth_prep = CheetahPrep(self.pname, self.argname, "required", True) self.exp_chth = "--test-arg $test_arg" self.assertEqual(self.chth_prep.chth, self.exp_chth)