diff --git a/_pytest/config.py b/_pytest/config.py index 68a3dafbe..17d0837cc 100644 --- a/_pytest/config.py +++ b/_pytest/config.py @@ -552,11 +552,18 @@ class ArgumentError(Exception): class Argument: - """class that mimics the necessary behaviour of optparse.Option """ + """class that mimics the necessary behaviour of optparse.Option + + its currently a least effort implementation + and ignoring choices and integer prefixes + https://docs.python.org/3/library/optparse.html#optparse-standard-option-types + """ _typ_map = { 'int': int, 'string': str, - } + 'float': float, + 'complex': complex, + } # enable after some grace period for plugin writers TYPE_WARN = False