def test_transformations_help(self):
     subcommands = cmdline.find_methods_in_package(transformations,
                                                   cmdline.is_cnf_transformation_subcommand)
     for sc in subcommands:
         with self.assertRaises(SystemExit) as cm:
             cnfformula.cnfgen(["cnfgen", "and", "0", "0" ,"-T", sc.name, "-h"])
         self.assertEqual(cm.exception.code, 0)
Exemple #2
0
def cnfgen_call():

    from cnfformula import cnfgen

    cmd = ["cnfgen"] + sys.argv[1:]

    with erase_stdout():
        cnfgen(cmd)
Exemple #3
0
def cnfgen_call():

    from cnfformula import cnfgen

    cmd = ["cnfgen"] + sys.argv[1:]

    with erase_stdout():
        cnfgen(cmd)
 def test_transformations_help(self):
     subcommands = cmdline.find_methods_in_package(
         transformations, cmdline.is_cnf_transformation_subcommand)
     for sc in subcommands:
         with self.assertRaises(SystemExit) as cm:
             cnfformula.cnfgen(
                 ["cnfgen", "and", "0", "0", "-T", sc.name, "-h"])
         self.assertEqual(cm.exception.code, 0)
Exemple #5
0
 def test_help(self):
     with self.assertRaises(SystemExit) as cm:
         cnfformula.cnfgen(["cnfgen","-h"])
     self.assertEqual(cm.exception.code, 0)