Created
December 9, 2019 20:08
-
-
Save jefftriplett/a57e565a8fe5b3db002e2afe32d39687 to your computer and use it in GitHub Desktop.
pytest + mypy + django + drf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mypy] | |
python_version = 3.7 | |
ignore_missing_imports = True | |
plugins = | |
mypy_django_plugin.main, | |
mypy_drf_plugin.main | |
strict_optional = True | |
[mypy.plugins.django-stubs] | |
django_settings_module = "config.test_settings" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pytest] | |
addopts = -v -W all --mypy | |
DJANGO_SETTINGS_MODULE = config.test_settings | |
# testpaths = tests <-- you probably don't need this... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
django-stubs==1.3.0 | |
django-test-plus==1.4.0 | |
djangorestframework-stubs==1.0.0 | |
pytest==5.0.1 | |
pytest-django==3.5.1 | |
pytest-mypy==0.4.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment