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

Merged
merged 6 commits into from Aug 17, 2019
Merged

Conversation

dmontagu
Copy link
Collaborator

@dmontagu 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
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
Collaborator

@samuelcolvin samuelcolvin left a comment

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

Makefile Outdated Show resolved Hide resolved
@samuelcolvin
Copy link
Collaborator

samuelcolvin commented Aug 16, 2019

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

@dmontagu
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 pydantic:master Aug 17, 2019
10 checks passed
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.

None yet

2 participants