summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog/5523.bugfix.rst1
-rw-r--r--src/_pytest/config/argparsing.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog/5523.bugfix.rst b/changelog/5523.bugfix.rst
new file mode 100644
index 000000000..5155b92b1
--- /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 d62ed0d03..43cf62ab1 100644
--- a/src/_pytest/config/argparsing.py
+++ b/src/_pytest/config/argparsing.py
@@ -358,7 +358,7 @@ class MyOptionParser(argparse.ArgumentParser):
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):