From 9aaa80a213ed1678d06e7aa888d1dd508dd1d9ae Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 25 Oct 2021 18:36:10 +0300 Subject: [PATCH] Cast Python warnings to errors when running "pytest" --- platformio/package/manifest/schema.py | 2 +- pytest.ini | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 pytest.ini diff --git a/platformio/package/manifest/schema.py b/platformio/package/manifest/schema.py index d17e6a20..416dccfd 100644 --- a/platformio/package/manifest/schema.py +++ b/platformio/package/manifest/schema.py @@ -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)) diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 00000000..03c86580 --- /dev/null +++ b/pytest.ini @@ -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 \ No newline at end of file