Skip to content

Speed up tests by simplifying the stub for typing #3486

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 1 commit into from
Jun 2, 2017

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jun 1, 2017

Don't include async types in the default typing stub used in tests
since they are only needed for a small fraction of test cases.

Make it possible to write [typing fixtures/typing-full.pyi] in tests
to use a more complete complete stub that includes the async types.
In the future we can move additional rarely used features to this
stub.

Also replace the definition of NewType in the test fixtures with a
simpler one to speed things up slightly.

These changes improved the running time of pytest mypy by about 35%
for me (on macOS).

Don't include async types in the default `typing` stub used in tests
since it's only needed for a small fraction of test cases.

Make it possible to write `[typing fixtures/typing-full.pyi]` in tests
to use a more complete complete stub that includes the async types.
In the future we can move additional rarely used features to this
stub.

Also replace the definition of `NewType` in the test fixtures with a
simpler one to speed things up slightly.

These changes improved the running time of `pytest mypy` by about 35%
for me (on macOS).
@gvanrossum gvanrossum merged commit d964562 into master Jun 2, 2017
@gvanrossum gvanrossum deleted the fixture-tweaks-2 branch June 2, 2017 00:31
carljm added a commit to carljm/mypy that referenced this pull request Jun 3, 2017
* master:
  Improve test output when a test doesn't specify the correct fixture (python#3488)
  Speed up tests by simplifying the stub for typing (python#3486)
  Clean up test fixtures (python#3485)
  Add additional quick mode test cases (python#3480)
  Add --strict-optional on by default to roadmap (python#3478)
  Minor speed-up in warn-return-any (python#3481)
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