Don't fail tests on warning from matplotlib
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Wed, 26 Feb 2020 18:45:58 +0000 (18:45 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Wed, 26 Feb 2020 18:45:58 +0000 (18:45 +0000)
New in Python 3.8

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: no

Gbp-Pq: Name ignore_matplotlib_warning.patch

pandas/util/testing.py

index 330312ac39c3cad47c6d8908b4543f1a31b3eebd..8ad615be0d07c6a62ab78992fa29baa09c5804d0 100644 (file)
@@ -2695,6 +2695,8 @@ def assert_produces_warning(
             else:
                 if actual_warning.category==UserWarning and "Non-x86 system detected" in str(actual_warning.message) and not bool(re.match('i.?86|x86',platform.uname()[4])):
                     continue
+                if actual_warning.category==DeprecationWarning and "PY_SSIZE_T_CLEAN will be required for '#' formats" in str(actual_warning.message) and 'matplotlib' in actual_warning.filename:
+                    continue
                 extra_warnings.append(
                     (
                         actual_warning.category.__name__,