コード例 #1
0
    def test_main_no_args(self):
        """Test main function with no arguments."""
        argv = []
        with self.assertRaises(SystemExit) as exc:
            evaluation.main(argv)

        self.assertNotEqual(exc.exception.code, 0)
コード例 #2
0
    def test_main_help(self):
        """Test argument parser's help."""
        argv = ['--help']

        with self.assertRaises(SystemExit) as exc:
            evaluation.main(argv)

        self.assertEqual(exc.exception.code, 0)
コード例 #3
0
    def test_main_default(self):
        """Test main function with default arguments."""
        argv = ['--from-feeds', 'recent', '-clf', self.clf_path]
        ret_val = evaluation.main(argv)

        self.assertIsNone(ret_val)