예제 #1
0
 def testDupCol(self):
     test_input = ["-f", DUP_COL_CMP_LIST]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertFalse(diff_lines(DEF_OUT, GOOD_OUT))
         self.assertTrue("Non-unique column" in output)
     silent_remove(DEF_OUT, disable=DISABLE_REMOVE)
예제 #2
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)
예제 #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)
예제 #4
0
 def testDupCol(self):
     test_input = ["-f", DUP_COL_CMP_LIST]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertFalse(diff_lines(DEF_OUT, GOOD_OUT))
         self.assertTrue("Non-unique column" in output)
     silent_remove(DEF_OUT, disable=DISABLE_REMOVE)
예제 #5
0
 def testMultiLineSepIni(self):
     # have different rows create different files
     # test that if the prefix is already used, number it
     # test if nothing common in the file base names, number it
     try:
         main(["-f", MULTI_LINE_CMP_LIST, "-s", "-l", SUB_DATA_DIR])
         self.assertFalse(diff_lines(LINE1_OUT, GOOD_LINE1_OUT))
         self.assertFalse(diff_lines(LINE2_OUT, GOOD_LINE2_OUT))
         self.assertFalse(diff_lines(LINE3_OUT, GOOD_LINE1_OUT))
         self.assertFalse(diff_lines(LINE4_OUT, GOOD_LINE1_OUT))
     finally:
         silent_remove(LINE1_OUT, disable=DISABLE_REMOVE)
         silent_remove(LINE2_OUT, disable=DISABLE_REMOVE)
         silent_remove(LINE3_OUT, disable=DISABLE_REMOVE)
         silent_remove(LINE4_OUT, disable=DISABLE_REMOVE)
예제 #6
0
 def testMultiLineSepIni(self):
     # have different rows create different files
     # test that if the prefix is already used, number it
     # test if nothing common in the file base names, number it
     try:
         main(["-f", MULTI_LINE_CMP_LIST, "-s", "-l", SUB_DATA_DIR])
         self.assertFalse(diff_lines(LINE1_OUT, GOOD_LINE1_OUT))
         self.assertFalse(diff_lines(LINE2_OUT, GOOD_LINE2_OUT))
         self.assertFalse(diff_lines(LINE3_OUT, GOOD_LINE1_OUT))
         self.assertFalse(diff_lines(LINE4_OUT, GOOD_LINE1_OUT))
     finally:
         silent_remove(LINE1_OUT, disable=DISABLE_REMOVE)
         silent_remove(LINE2_OUT, disable=DISABLE_REMOVE)
         silent_remove(LINE3_OUT, disable=DISABLE_REMOVE)
         silent_remove(LINE4_OUT, disable=DISABLE_REMOVE)
예제 #7
0
 def testMultiFileIni(self):
     try:
         main(["-f", MULTI_FILE_CMP_LIST])
         self.assertFalse(diff_lines(DEF_OUT, GOOD_MULTI_FILE_OUT))
     finally:
         silent_remove(DEF_OUT, disable=DISABLE_REMOVE)
예제 #8
0
 def testDefIni(self):
     try:
         main(["-f", DEF_CMP_LIST])
         self.assertFalse(diff_lines(DEF_OUT, GOOD_OUT))
     finally:
         silent_remove(DEF_OUT, disable=DISABLE_REMOVE)
예제 #9
0
 def testUnregArg(self):
     test_input = ['-@@@', "-f", DEF_CMP_LIST]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertTrue("unrecognized arguments" in output)
예제 #10
0
 def testMultiFileIni(self):
     try:
         main(["-f", MULTI_FILE_CMP_LIST])
         self.assertFalse(diff_lines(DEF_OUT, GOOD_MULTI_FILE_OUT))
     finally:
         silent_remove(DEF_OUT, disable=DISABLE_REMOVE)
예제 #11
0
 def testDefIni(self):
     try:
         main(["-f", DEF_CMP_LIST])
         self.assertFalse(diff_lines(DEF_OUT, GOOD_OUT))
     finally:
         silent_remove(DEF_OUT, disable=DISABLE_REMOVE)
예제 #12
0
 def testUnregArg(self):
     test_input = ['-@@@', "-f", DEF_CMP_LIST]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertTrue("unrecognized arguments" in output)