Skip to content
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

Test mypy integration with pytest #735

Merged
merged 6 commits into from Aug 17, 2019
Merged

Conversation

@dmontagu
Copy link
Collaborator

dmontagu commented Aug 11, 2019

Change Summary

In preparation for integrating a mypy plugin, I've refactored the mypy tests to be called via mypy.api.run through pytest.

I see several benefits to this:

  1. We can more easily validate the specific contents of mypy error messages
  2. We can add mypy fails and successes without requiring updates to the Makefile
  3. We will be able to perform coverage testing for the mypy plugin (if it gets merged).

Related issue number

@samuelcolvin Given this shouldn't have any effects on external usage of the library, I figured this pull request would be the right place for discussion, but let me know if you'd like me to open a separate issue.

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.rst file added describing change
    (see changes/README.md for details)
Makefile Show resolved Hide resolved
@codecov

This comment has been minimized.

Copy link

codecov bot commented Aug 11, 2019

Codecov Report

Merging #735 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #735   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines        2723   2723           
  Branches      536    536           
=====================================
  Hits         2723   2723
Copy link
Owner

samuelcolvin left a comment

LGTM, do you want to remove external-mypy now?

Makefile Outdated Show resolved Hide resolved
@samuelcolvin

This comment has been minimized.

Copy link
Owner

samuelcolvin commented Aug 16, 2019

maybe I'm being dumb, but I thought we could remove external-mypy from Makefile completely?

@dmontagu dmontagu force-pushed the dmontagu:mypy-tests branch from e989715 to 3561358 Aug 16, 2019
@dmontagu

This comment has been minimized.

Copy link
Collaborator Author

dmontagu commented Aug 16, 2019

@samuelcolvin Just pushed with external-mypy removed from makefile and CI

@samuelcolvin samuelcolvin merged commit 6c0f4f3 into samuelcolvin:master Aug 17, 2019
10 checks passed
10 checks passed
Header rules No header rules processed
Details
Pages changed All files already uploaded
Details
Redirect rules No redirect rules processed
Details
Mixed content No mixed content detected
Details
codecov/project 100% remains the same compared to 5b5451c
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
samuelcolvin.pydantic Build #20190816.11 succeeded
Details
samuelcolvin.pydantic (Job Python36) Job Python36 succeeded
Details
samuelcolvin.pydantic (Job Python37) Job Python37 succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.