Skip to content

Treat --python-version X.Y and --python-version=X.Y in tests equally #8026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify code
  • Loading branch information
Ivan Levkivskyi committed Nov 27, 2019
commit 8967c1d52a07df7a0413af01dc6a48e97ffe6e8d
6 changes: 2 additions & 4 deletions mypy/test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,8 @@ def parse_options(program_text: str, testcase: DataDrivenTestCase,
options.strict_optional = False
options.error_summary = False

# Allow custom python version to override testcase_pyversion
if (not flag_list or
all(flag.split('=')[0] not in ['--python-version', '-2', '--py2']
for flag in flag_list)):
# Allow custom python version to override testcase_pyversion.
if all(flag.split('=')[0] not in ['--python-version', '-2', '--py2'] for flag in flag_list):
options.python_version = testcase_pyversion(testcase.file, testcase.name)

if testcase.config.getoption('--mypy-verbose'):
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy