def testThreeRealFileTwoFlags(self):
     test_input = [
         '-f', 'data/BMB.csv', 'data/RGD.csv', '-f', 'data/HBP.csv'
     ]
     foo = parse_cmdline(test_input)
     ret = parse_cmdline(test_input)[0]['file']
     self.assertTrue('data/BMB.csv' in ret and 'data/RGD.csv' in ret
                     and 'data/HBP.csv')
    def testNoArgs(self):
        test_input = []
        with self.assertRaises(SystemExit) as cm:
            parse_cmdline(test_input)

        self.assertEqual(cm.exception.code, 2)
 def testOutputGoodDiffDir(self):
     test_input = ['-f', 'data/BMB.csv', '-o', '/foo.png']
     ret = parse_cmdline(test_input)
     path = Path("/foo.png").resolve()
     self.assertTrue(ret[0]['output'] == path)
 def testOneBadOneGood(self):
     test_input = ['-f', 'data/BMB.csv', '/foo/bar.csv']
     self.assertTrue(parse_cmdline(test_input)[1] == 2)
 def testBadFile(self):
     test_input = ['-f', '/foo/bar.csv']
     self.assertTrue(parse_cmdline(test_input)[1] == 2)
 def testTwoRealFileOneFlag(self):
     test_input = ['-f', 'data/BMB.csv', 'data/RGD.csv']
     foo = parse_cmdline(test_input)
     ret = parse_cmdline(test_input)[0]['file']
     self.assertTrue('data/BMB.csv' in ret and 'data/RGD.csv' in ret)
 def testOneRealFile(self):
     test_input = ['-f', 'data/BMB.csv']
     foo = parse_cmdline(test_input)
     self.assertTrue(
         parse_cmdline(test_input)[0]['file'] == ['data/BMB.csv'])