def testSpecOverwrite(self): try: main([str(EXP_TEMP), "-o"]) self.assertFalse(diff_lines(ORIG_WHAM_OUT, GOOD_ORIG_WHAM_OUT)) self.assertFalse(diff_lines(SHORT_WHAM_OUT, GOOD_SHORT_WHAM_OUT)) finally: silent_remove(ORIG_WHAM_OUT, disable=DISABLE_REMOVE) silent_remove(SHORT_WHAM_OUT, disable=DISABLE_REMOVE)
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)
def testSpecFile(self): try: main([str(EXP_TEMP), "-f", SHORT_WHAM_PATH]) self.assertFalse(diff_lines(SHORT_WHAM_OUT, GOOD_SHORT_WHAM_OUT)) finally: silent_remove(SHORT_WHAM_OUT, disable=DISABLE_REMOVE)