diff --git a/changelog/5523.bugfix.rst b/changelog/5523.bugfix.rst new file mode 100644 index 00000000000..5155b92b156 --- /dev/null +++ b/changelog/5523.bugfix.rst @@ -0,0 +1 @@ +Fixed using multiple short options together in the command-line (for example ``-vs``) in Python 3.8+. diff --git a/src/_pytest/config/argparsing.py b/src/_pytest/config/argparsing.py index d62ed0d03c2..43cf62ab167 100644 --- a/src/_pytest/config/argparsing.py +++ b/src/_pytest/config/argparsing.py @@ -358,7 +358,7 @@ def parse_args(self, args=None, namespace=None): getattr(args, FILE_OR_DIR).extend(argv) return args - if sys.version_info[:2] < (3, 8): # pragma: no cover + if sys.version_info[:2] < (3, 9): # pragma: no cover # Backport of https://github.com/python/cpython/pull/14316 so we can # disable long --argument abbreviations without breaking short flags. def _parse_optional(self, arg_string):