traitlets icon indicating copy to clipboard operation
traitlets copied to clipboard

TestArgcomplete.test_complete_custom_completers fails with 3.12.7

Open mcepl opened this issue 1 year ago • 2 comments

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.

mcepl avatar Oct 05 '24 21:10 mcepl

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

azjps avatar Oct 06 '24 07:10 azjps

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 https://github.com/kislyuk/argcomplete/pull/513 fixes.

build log

running 5.14.3 with python 3.12.7 and argcomplete 3.5.1

paparodeo avatar Dec 06 '24 06:12 paparodeo