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)
Exemplo n.º 2
0
def cnfgen_call():

    from cnfformula import cnfgen

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

    with erase_stdout():
        cnfgen(cmd)
Exemplo n.º 3
0
def cnfgen_call():

    from cnfformula import cnfgen

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

    with erase_stdout():
        cnfgen(cmd)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 def test_help(self):
     with self.assertRaises(SystemExit) as cm:
         cnfformula.cnfgen(["cnfgen","-h"])
     self.assertEqual(cm.exception.code, 0)