Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 Error and 13 failed tests with Python 3.12.7 #507

Open
mcepl opened this issue Oct 5, 2024 · 0 comments
Open

1 Error and 13 failed tests with Python 3.12.7 #507

mcepl opened this issue Oct 5, 2024 · 0 comments

Comments

@mcepl
Copy link

mcepl commented Oct 5, 2024

With the upgrade to 3.12.7 tests started to fail, most likely because of large changes to argparse module:

[  246s] ======================================================================
[  246s] ERROR: test_repl_parse_after_complete (__main__.TestArgcompleteREPL.test_repl_parse_after_complete)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 934, in test_repl_parse_after_complete
[  246s]     args = p.parse_args(["--foo", "spam", "bar"])
[  246s]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[  246s]   File "/usr/lib64/python3.12/argparse.py", line 1895, in parse_args
[  246s]     args, argv = self.parse_known_args(args, namespace)
[  246s]                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[  246s]   File "/usr/lib64/python3.12/argparse.py", line 1931, in parse_known_args
[  246s]     namespace, args = self._parse_known_args(args, namespace)
[  246s]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/argcomplete/packages/_argparse.py", line 302, in _parse_known_args
[  246s]     start_index = consume_optional(start_index)
[  246s]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/argcomplete/packages/_argparse.py", line 168, in consume_optional
[  246s]     action, option_string, _, explicit_arg = option_tuple
[  246s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[  246s] ValueError: not enough values to unpack (expected 4, got 1)
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_choices (__main__.TestArgcomplete.test_choices)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 179, in test_choices
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output))
[  246s] AssertionError: Items in the first set but not the second:
[  246s] '--help'
[  246s] '-h'
[  246s] '--ship'
[  246s] Items in the second set but not the first:
[  246s] 'submarine'
[  246s] 'speedboat'
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_completers (__main__.TestArgcomplete.test_completers)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 300, in test_completers
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output))
[  246s] AssertionError: Items in the first set but not the second:
[  246s] '--help'
[  246s] '-h'
[  246s] '--url'
[  246s] '--email'
[  246s] Items in the second set but not the first:
[  246s] 'http://url1'
[  246s] 'http://url2'
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_default_completer (__main__.TestArgcomplete.test_default_completer)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 424, in test_default_completer
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output))
[  246s] AssertionError: Items in the first set but not the second:
[  246s] '--many'
[  246s] '--one'
[  246s] Items in the second set but not the first:
[  246s] 'test/'
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_escape_special_chars (__main__.TestArgcomplete.test_escape_special_chars)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 832, in test_escape_special_chars
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), "prog -1 ")), {r"bar\<\$\>baz "})
[  246s] AssertionError: Items in the first set but not the second:
[  246s] '-2'
[  246s] '-1'
[  246s] '-3'
[  246s] Items in the second set but not the first:
[  246s] 'bar\\<\\$\\>baz '
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_exclusive (__main__.TestArgcomplete.test_exclusive)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 773, in test_exclusive
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output))
[  246s] AssertionError: Items in the first set but not the second:
[  246s] '--no-bar'
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_exclusive_class (__main__.TestArgcomplete.test_exclusive_class)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 822, in test_exclusive_class
[  246s]     self.assertEqual(set(self.run_completer(parser, cmd, completer=completer)), set(output))
[  246s] AssertionError: Items in the first set but not the second:
[  246s] '--no-bar'
[  246s] '--foo'
[  246s] '--bar'
[  246s] '--baz'
[  246s] Items in the second set but not the first:
[  246s] 'baz2'
[  246s] 'baz1'
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_filescompleter_filetype_integration (__main__.TestArgcomplete.test_filescompleter_filetype_integration)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 378, in test_filescompleter_filetype_integration
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output))
[  246s] AssertionError: Items in the first set but not the second:
[  246s] '--help'
[  246s] '-h'
[  246s] '--r'
[  246s] '--w'
[  246s] Items in the second set but not the first:
[  246s] 'abcdefж/'
[  246s] 'abcaha/'
[  246s] 'abcxyz'
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_mixed_optional_positional (__main__.TestArgcomplete.test_mixed_optional_positional)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 793, in test_mixed_optional_positional
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output))
[  246s] AssertionError: Items in the first set but not the second:
[  246s] '--set'
[  246s] Items in the second set but not the first:
[  246s] 'name1'
[  246s] 'name2'
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_non_ascii (__main__.TestArgcomplete.test_non_ascii)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 482, in test_non_ascii
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output))
[  246s] AssertionError: Items in the first set but not the second:
[  246s] '--help'
[  246s] '-h'
[  246s] '--книга'
[  246s] Items in the second set but not the first:
[  246s] 'Понедельник\\ начинается\\ в\\ субботу'
[  246s] 'Трудно\\ быть\\ богом'
[  246s] 'Парень\\ из\\ преисподней'
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_optional_nargs (__main__.TestArgcomplete.test_optional_nargs)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 697, in test_optional_nargs
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output))
[  246s] AssertionError: Items in the first set but not the second:
[  246s] '--help'
[  246s] '--bar'
[  246s] '--foo'
[  246s] '--foobar'
[  246s] '-h'
[  246s] '--baz'
[  246s] '--qux'
[  246s] Items in the second set but not the first:
[  246s] 'foo1'
[  246s] 'foo2'
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_positional_remainder (__main__.TestArgcomplete.test_positional_remainder)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 717, in test_positional_remainder
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output))
[  246s] AssertionError: Items in the second set but not the first:
[  246s] 'pos'
[  246s] '--opt'
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_subparser_completers (__main__.TestArgcomplete.test_subparser_completers)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 345, in test_subparser_completers
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output))
[  246s] AssertionError: Items in the second set but not the first:
[  246s] 'val5'
[  246s] 
[  246s] ======================================================================
[  246s] FAIL: test_subparsers (__main__.TestArgcomplete.test_subparsers)
[  246s] ----------------------------------------------------------------------
[  246s] Traceback (most recent call last):
[  246s]   File "/home/abuild/rpmbuild/BUILD/argcomplete-3.4.0/./test/test.py", line 451, in test_subparsers
[  246s]     self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output))
[  246s] AssertionError: Items in the first set but not the second:
[  246s] 'spam'
[  246s] '--age'
[  246s] 'eggs'
[  246s] Items in the second set but not the first:
[  246s] 'on\\ a\\ boat'
[  246s] 'in\\ the\\ rain'
[  246s] 'on\\ a\\ train'
[  246s] 'with\\ a\\ goat'
[  246s] 
[  246s] ----------------------------------------------------------------------
[  246s] Ran 189 tests in 116.052s
[  246s] 
[  246s] FAILED (failures=13, errors=1, skipped=12, expected failures=5)

Complete build log with all packages used and all steps taken to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant