Cast Python warnings to errors when running "pytest"

This commit is contained in:
Ivan Kravets
2021-10-25 18:36:10 +03:00
parent acb6cbffa0
commit 9aaa80a213
2 changed files with 6 additions and 1 deletions

View File

@ -89,7 +89,7 @@ class StrictListField(fields.List):
class AuthorSchema(StrictSchema):
name = fields.Str(required=True, validate=validate.Length(min=1, max=100))
email = fields.Email(validate=validate.Length(min=1, max=50))
maintainer = fields.Bool(default=False)
maintainer = fields.Bool(dump_default=False)
url = fields.Url(validate=validate.Length(min=1, max=255))

5
pytest.ini Normal file
View File

@ -0,0 +1,5 @@
[pytest]
filterwarnings =
error
# Marshmallow
ignore:The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives:DeprecationWarning