1. Tikitu de Jager
  2. argparse_config

Commits

Tikitu de Jager  committed f9d1705 Draft

Fixed broken test.

  • Participants
  • Parent commits 52537ef
  • Branches default

Comments (0)

Files changed (1)

File argparse_config.src/argparse_config/tests/__init__.py

View file
  • Ignore whitespace
         subcommand_parser = sub_parsers.add_parser('subcommand')
         subcommand_parser.add_argument('--tool', default='hammer')
 
-        parsed_args = arg_parser.parse_args([])
-        new_config_file = write_defaults(arg_parser)
+        parsed_args = arg_parser.parse_args(['subcommand'])
+        new_config_file = write_defaults(arg_parser, parsed_args)
         self.assertEquals(new_config_file, textwrap.dedent("""
         [default]
 
         """.lstrip('\n')))
 
         set_defaults(arg_parser, config_parser)
-        parsed_args = arg_parser.parse_args([])
-        new_config_file = write_defaults(arg_parser)
+        parsed_args = arg_parser.parse_args(['subcommand'])
+        new_config_file = write_defaults(arg_parser, parsed_args)
         self.assertEquals(new_config_file, textwrap.dedent("""
         [default]
         int_value: 3