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

TestArgcomplete.test_complete_custom_completers fails with 3.12.7 #911

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

TestArgcomplete.test_complete_custom_completers fails with 3.12.7 #911

mcepl opened this issue Oct 5, 2024 · 2 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:

[   42s] =================================== FAILURES ===================================
[   42s] _______________ TestArgcomplete.test_complete_custom_completers ________________
[   42s] 
[   42s] self = <tests.config.test_argcomplete.TestArgcomplete object at 0x7fdb5d39c320>
[   42s] argcomplete_on = None
[   42s] 
[   42s]     def test_complete_custom_completers(self, argcomplete_on):
[   42s]         app = ArgcompleteApp()
[   42s]         # test pre-defined completers for Bool/Enum
[   42s] >       assert set(self.run_completer(app, "app --Application.log_level=")) > {"DEBUG", "INFO"}
[   42s] E       AssertionError: assert {''} > {'DEBUG', 'INFO'}
[   42s] E         
[   42s] E         Extra items in the right set:
[   42s] E         'INFO'
[   42s] E         'DEBUG'
[   42s] 
[   42s] app        = <tests.config.test_argcomplete.ArgcompleteApp object at 0x7fdb5d20fe90>
[   42s] argcomplete_on = None
[   42s] self       = <tests.config.test_argcomplete.TestArgcomplete object at 0x7fdb5d39c320>
[   42s] 
[   42s] tests/config/test_argcomplete.py:157: AssertionError
[   42s] =============================== warnings summary ===============================
[   42s] tests/_warnings.py::tests._warnings.all_warnings
[   42s]   <doctest tests._warnings.all_warnings[1]>:2: RuntimeWarning: bar
[   42s] 
[   42s] -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
[   42s] ============================= slowest 10 durations =============================
[   42s] 0.19s call     tests/config/test_application.py::test_help_output
[   42s] 0.18s call     tests/config/test_application.py::test_help_all_output
[   42s] 0.18s call     tests/config/test_application.py::test_show_config_json_cli
[   42s] 0.17s call     tests/config/test_application.py::test_show_config_cli
[   42s] 0.02s call     tests/config/test_argcomplete.py::TestArgcomplete::test_complete_subcommands
[   42s] 
[   42s] (5 durations < 0.005s hidden.  Use -vv to show these durations.)
[   42s] =========================== short test summary info ============================
[   42s] SKIPPED [1] ../../../../../usr/lib/python3.12/site-packages/_pytest/doctest.py:457: all tests skipped by +SKIP option
[   42s] FAILED tests/config/test_argcomplete.py::TestArgcomplete::test_complete_custom_completers
[   42s] ============= 1 failed, 571 passed, 1 skipped, 1 warning in 1.48s ==============

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

@azjps
Copy link
Collaborator

azjps commented Oct 6, 2024

This should be the same issue as kislyuk/argcomplete#507, I assume the fix in argcomplete should be relatively straightforward, this test could be temporarily skipped in the meantime if its blocking anything.

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Oct 6, 2024
https://build.opensuse.org/request/show/1205857
by user mcepl + anag+factory
FOR  openSUSE:Factory:Staging:I

- Skip test_complete_custom_completers test because it is failing
  with 3.12.7 (gh#ipython/traitlets#911).
@paparodeo
Copy link

paparodeo commented Dec 6, 2024

This should be the same issue as kislyuk/argcomplete#507, I assume the fix in argcomplete should be relatively straightforward, this test could be temporarily skipped in the meantime if its blocking anything.

still seems broken but the (reverted) patch at kislyuk/argcomplete#513 fixes.

build log

running 5.14.3 with python 3.12.7 and argcomplete 3.5.1

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

3 participants