Skip to content

test_decorator failure for Python 3.11.4 #269

@zhiruiluo

Description

@zhiruiluo

Describe the bug
test_decorator.py failed during collection for Python 3.11.4 at line 65.

>> signature = signature.replace(parameters=new_parameters)  
test/test_decorator.py:86: in <module>
    ("--b=2", 4, partial(_fn_with_all_argument_types, 1, c=1)),
test/test_decorator.py:66: in partial
    signature = signature.replace(parameters=new_parameters)
conda/envs/py311test/lib/python3.11/inspect.py:3052: in replace
    return type(self)(parameters,
.conda/envs/py311test/lib/python3.11/inspect.py:3008: in __init__
    raise ValueError(msg)
E   ValueError: non-default argument follows default argument
---------------------------------------------------------------

The test case ("--b=2", 4, partial(_fn_with_all_argument_types, 1, c=1)), has parameters [<Parameter "a: int = 1">, <Parameter "b: int">, <Parameter "c: int = 1">]

To Reproduce

pytest test/test_decorator.py

Desktop (please complete the following information):

  • Version: master
  • Python version: 3.11.4

Additional context
Add any other context about the problem here.

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