Skip to content

Test mypy integration with pytest#735

Merged
samuelcolvin merged 6 commits intopydantic:masterfrom
dmontagu:mypy-tests
Aug 17, 2019
Merged

Test mypy integration with pytest#735
samuelcolvin merged 6 commits intopydantic:masterfrom
dmontagu:mypy-tests

Conversation

@dmontagu
Copy link
Copy Markdown
Contributor

@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)

Comment thread Makefile
Comment thread tests/mypy/mypy-default.ini
@codecov
Copy link
Copy Markdown

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
Copy Markdown
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

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

Comment thread Makefile Outdated
@samuelcolvin
Copy link
Copy Markdown
Member

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

@dmontagu
Copy link
Copy Markdown
Contributor Author

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

@samuelcolvin samuelcolvin merged commit 6c0f4f3 into pydantic:master Aug 17, 2019
alexdrydew pushed a commit to alexdrydew/pydantic that referenced this pull request Dec 23, 2023
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