def test_get_parser_filename(self): parser = get_parser() options = parser.parse_args(['filename']) self.assertEqual(options.input, 'filename')
def assert_get_parser_error(self, args, expected, mock_stderr): parser = get_parser() with self.assertRaises(SystemExit): parser.parse_args(args) self.assertIn(expected, mock_stderr.write.call_args[0][0])