Skip to content

Commit 497cd87

Browse files
authored
Apply workaround for multiple short options for Python <= 3.8 (#5526)
Apply workaround for multiple short options for Python <= 3.8
2 parents d4a76a0 + 94a05e5 commit 497cd87

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ jobs:
5555
- env: TOXENV=py37-pluggymaster-xdist
5656
- env: TOXENV=py37-freeze
5757

58-
# Jobs only run via Travis cron jobs (currently daily).
5958
- env: TOXENV=py38-xdist
6059
python: '3.8-dev'
61-
if: type = cron
6260

6361
- stage: baseline
6462
env: TOXENV=py36-xdist

changelog/5523.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed using multiple short options together in the command-line (for example ``-vs``) in Python 3.8+.

src/_pytest/config/argparsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def parse_args(self, args=None, namespace=None):
358358
getattr(args, FILE_OR_DIR).extend(argv)
359359
return args
360360

361-
if sys.version_info[:2] < (3, 8): # pragma: no cover
361+
if sys.version_info[:2] < (3, 9): # pragma: no cover
362362
# Backport of https://github.com/python/cpython/pull/14316 so we can
363363
# disable long --argument abbreviations without breaking short flags.
364364
def _parse_optional(self, arg_string):

0 commit comments

Comments
 (0)