Ejemplo n.º 1
0
 def testDefInp(self):
     try:
         test_input = ["-f", DEF_COMPARE, "-b", DEF_BASE]
         main(test_input)
         self.assertFalse(diff_lines(RMSD_OUT, GOOD_RMSD_OUT))
     finally:
         silent_remove(RMSD_OUT, disable=DISABLE_REMOVE)
Ejemplo n.º 2
0
 def testNoArgs(self):
     test_input = []
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         # Error in looking for ini file
         self.assertTrue("Problems reading file" in output)
Ejemplo n.º 3
0
 def testHelp(self):
     test_input = ['-h']
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertFalse(output)
     with capture_stdout(main, test_input) as output:
         self.assertTrue("optional arguments" in output)
Ejemplo n.º 4
0
 def testMissingCol(self):
     test_input = ["-f", MISSING_COMPARE, "-b", DEF_BASE]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertTrue("Could not find key" in output)
Ejemplo n.º 5
0
 def testNoSuchFile(self):
     test_input = ["-f", "ghost.csv", "-b", DEF_BASE]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertTrue("Problems reading file" in output)