Skip to content

test_help fails on Python 3.13 #272

Open
@mweinelt

Description

@mweinelt

Looks like the usage output of argparse was updated and short and long opt are now listed separately with Python 3.13.

__________________________________ test_help ___________________________________
[gw29] linux -- Python 3.13.0 /nix/store/0b83hlniyfbpha92k2j0w93mxdalv8kb-python3-3.13.0/bin/python3.13
/build/source/tests/test_cli.py:27: in test_help
    result.stdout.fnmatch_lines(
E   Failed: fnmatch: 'usage: py.test-benchmark *'
E      with: 'usage: py.test-benchmark [-h [COMMAND]] [--storage URI] [--netrc [NETRC]]'
E   nomatch: '                         {help,list,compare} ...'
E       and: '                         [--verbose] [--quiet]'
E       and: '                         [--import-mode {prepend,append,importlib}]'
E   exact match: '                         {help,list,compare} ...'
E   exact match: ''
E   exact match: "pytest_benchmark's management commands."
E   exact match: ''
E   fnmatch: 'option*:'
E      with: 'options:'
E   nomatch: '  -h [COMMAND], --help [COMMAND]'
E       and: '  -h, --help [COMMAND]  Display help and exit.'
E       and: '  --storage, -s URI     Specify a path to store the runs as uri in form'
E       and: '                        file://path or elasticsearch+http[s]://host1,host2/[in'
E       and: '                        dex/doctype?project_name=Project] (when --benchmark-'
E       and: '                        save or --benchmark-autosave are used). For backwards'
E       and: '                        compatibility unexpected values are converted to'
E       and: "                        file://<value>. Default: 'file://./.benchmarks'."
E       and: '  --netrc [NETRC]       Load elasticsearch credentials from a netrc file.'
E       and: "                        Default: ''."
E       and: '  --verbose, -v         Dump diagnostic and progress information.'
E       and: '  --quiet, -q           Disable reporting. Verbose mode takes precedence.'
E       and: '  --import-mode {prepend,append,importlib}'
E       and: '                        How to attempt loading hooks from conftest. Akin to'
E       and: "                        pytest's --import-mode. Default: 'prepend'."
E       and: ''
E       and: 'commands:'
E       and: '  {help,list,compare}'
E       and: '    help                Display help and exit.'
E       and: '    list                List saved runs.'
E       and: '    compare             Compare saved runs.'
E   remains unmatched: '  -h [COMMAND], --help [COMMAND]'
----------------------------- Captured stdout call -----------------------------
running: py.test-benchmark --help
     in: /build/pytest-of-nixbld/pytest-0/popen-gw29/test_help0
usage: py.test-benchmark [-h [COMMAND]] [--storage URI] [--netrc [NETRC]]
                         [--verbose] [--quiet]
                         [--import-mode {prepend,append,importlib}]
                         {help,list,compare} ...

pytest_benchmark's management commands.

options:
  -h, --help [COMMAND]  Display help and exit.
  --storage, -s URI     Specify a path to store the runs as uri in form
                        file://path or elasticsearch+http[s]://host1,host2/[in
                        dex/doctype?project_name=Project] (when --benchmark-
                        save or --benchmark-autosave are used). For backwards
                        compatibility unexpected values are converted to
                        file://<value>. Default: 'file://./.benchmarks'.
  --netrc [NETRC]       Load elasticsearch credentials from a netrc file.
                        Default: ''.
  --verbose, -v         Dump diagnostic and progress information.
  --quiet, -q           Disable reporting. Verbose mode takes precedence.
  --import-mode {prepend,append,importlib}
                        How to attempt loading hooks from conftest. Akin to
                        pytest's --import-mode. Default: 'prepend'.

commands:
  {help,list,compare}
    help                Display help and exit.
    list                List saved runs.
    compare             Compare saved runs.

Learn more about nbmake at https://github.com/treebeardtech/nbmake

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions