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

Tests fail on Python 3.13 #150

Closed
JelleZijlstra opened this issue Oct 11, 2024 · 2 comments · Fixed by #151
Closed

Tests fail on Python 3.13 #150

JelleZijlstra opened this issue Oct 11, 2024 · 2 comments · Fixed by #151

Comments

@JelleZijlstra
Copy link

A number of tests fail when typed-argument-parser is run on 3.13. Looks like some help output changed.

=========================== short test summary info ============================
FAILED tests/test_to_tap_class.py::test_subclasser_complex_help_message[function] - AssertionError: assert 'usage: pytes...sage and exit' == 'usage: pytes...sage and exit'
  
  Skipping 138 identical leading characters in diff, use -v to show
  - ions: -arg ARGUMENT_WITH_REALLY_LONG_NAME, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME (Union[float, int], default=3) This argument has a long name and will be aliased with a short one --arg_int ARG_INT (int, required) some integer --arg_bool (bool, default=True) --arg_list [ARG_LIST ...] (Optional[List[str]], default=None) some list of strings -h, --help show this help message and exit
  ?                                          -----------------------------------------------------------------
  + ions: -arg, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME (Union[float, int], default=3) This argument has a long name and will be aliased with a short one --arg_int ARG_INT (int, required) some integer --arg_bool (bool, default=True) --arg_list [ARG_LIST ...] (Optional[List[str]], default=None) some list of strings -h, --help show this help message and exit
  ?           ++++++++++++++++++++++++++++++++++
FAILED tests/test_to_tap_class.py::test_subclasser_complex_help_message[Class] - AssertionError: assert 'usage: pytes...sage and exit' == 'usage: pytes...sage and exit'
  
  Skipping 138 identical leading characters in diff, use -v to show
  - ions: -arg ARGUMENT_WITH_REALLY_LONG_NAME, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME (Union[float, int], default=3) This argument has a long name and will be aliased with a short one --arg_int ARG_INT (int, required) some integer --arg_bool (bool, default=True) --arg_list [ARG_LIST ...] (Optional[List[str]], default=None) some list of strings -h, --help show this help message and exit
  ?                                          -----------------------------------------------------------------
  + ions: -arg, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME (Union[float, int], default=3) This argument has a long name and will be aliased with a short one --arg_int ARG_INT (int, required) some integer --arg_bool (bool, default=True) --arg_list [ARG_LIST ...] (Optional[List[str]], default=None) some list of strings -h, --help show this help message and exit
  ?           ++++++++++++++++++++++++++++++++++
FAILED tests/test_to_tap_class.py::test_subclasser_complex_help_message[_Args] - AssertionError: assert 'usage: pytes...sage and exit' == 'usage: pytes...sage and exit'
  
  Skipping 138 identical leading characters in diff, use -v to show
  - ions: -arg ARGUMENT_WITH_REALLY_LONG_NAME, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME (Union[float, int], default=3) This argument has a long name and will be aliased with a short one --arg_int ARG_INT (int, required) some integer --arg_bool (bool, default=True) --arg_list [ARG_LIST ...] (Optional[List[str]], default=None) some list of strings -h, --help show this help message and exit
  ?                                          -----------------------------------------------------------------
  + ions: -arg, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME (Union[float, int], default=3) This argument has a long name and will be aliased with a short one --arg_int ARG_INT (int, required) some integer --arg_bool (bool, default=True) --arg_list [ARG_LIST ...] (Optional[List[str]], default=None) some list of strings -h, --help show this help message and exit
  ?           ++++++++++++++++++++++++++++++++++
FAILED tests/test_to_tap_class.py::test_subclasser_complex_help_message[class_or_function_3] - AssertionError: assert 'usage: pytes...sage and exit' == 'usage: pytes...sage and exit'
  
  Skipping 138 identical leading characters in diff, use -v to show
  - ions: -arg ARGUMENT_WITH_REALLY_LONG_NAME, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME (Union[float, int], default=3) This argument has a long name and will be aliased with a short one --arg_int ARG_INT (int, required) some integer --arg_bool (bool, default=True) --arg_list [ARG_LIST ...] (Optional[List[str]], default=None) some list of strings -h, --help show this help message and exit
  ?                                          -----------------------------------------------------------------
  + ions: -arg, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME (Union[float, int], default=3) This argument has a long name and will be aliased with a short one --arg_int ARG_INT (int, required) some integer --arg_bool (bool, default=True) --arg_list [ARG_LIST ...] (Optional[List[str]], default=None) some list of strings -h, --help show this help message and exit
  ?           ++++++++++++++++++++++++++++++++++
======================== 4 failed, [299](https://github.com/python/typing_extensions/actions/runs/11285716477/job/31388972083?pr=484#step:10:300) passed in 1.32s =========================

Found this while working on python/typing_extensions#484.

@kddubey
Copy link
Contributor

kddubey commented Oct 11, 2024

My b, I'll fix soon

@swansonk14
Copy link
Owner

This has now been fixed in #151. Thank you @JelleZijlstra for bringing up the issue and @kddubey for fixing it so quickly!

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

Successfully merging a pull request may close this issue.

3 participants