Skip to content

Add a mypy self test #4337

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 7 commits into from
Oct 25, 2020
Merged

Add a mypy self test #4337

merged 7 commits into from
Oct 25, 2020

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Jul 17, 2020

Rename mypy_selftest to mypy_test_suite

Cf. #4333

shutil.copytree('stdlib', str(dirpath / 'mypy/mypy/typeshed/stdlib'))
shutil.copytree('third_party', str(dirpath / 'mypy/mypy/typeshed/third_party'))
try:
subprocess.run(['pytest', '-n12'], cwd=str(dirpath / 'mypy'), check=True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this should be -n auto?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just moved this file from the old mypy_selftest.py. I'd consider changes to it out of scope of this PR.

try:
subprocess.run(['pytest', '-n12'], cwd=str(dirpath / 'mypy'), check=True)
subprocess.run([sys.executable, "-m", "pip", "install", f"mypy=={MYPY_VERSION}"], check=True)
subprocess.run(["mypy", "--custom-typeshed-dir", ".", dirpath / "mypy", dirpath / "mypyc"], check=True)
Copy link
Collaborator

@hauntsaninja hauntsaninja Jul 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't pass for me against mypy master (after removing --custom-typeshed-dir). The command mypy uses is mypy --config-file mypy_self_check.ini -p mypy -p mypyc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try this config file.

@srittau
Copy link
Collaborator Author

srittau commented Jul 18, 2020

Still failing. We'd need to investigate further if we decide that this is a viable way to go forward.

@hauntsaninja hauntsaninja marked this pull request as ready for review October 25, 2020 00:57
@hauntsaninja hauntsaninja merged commit 0583738 into python:master Oct 25, 2020
@srittau srittau deleted the mypy-selftest branch October 26, 2020 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants