diff options
author | Pierre de Buyl <pdebuyl@pdebuyl.be> | 2021-11-17 10:08:57 +0100 |
---|---|---|
committer | Pierre de Buyl <pdebuyl@pdebuyl.be> | 2021-12-08 15:29:33 +0100 |
commit | 5ee37b0e7966cd7181f3436a6758b19871d2597f (patch) | |
tree | 9eb7d73dc45a23e5946fb67f293650629525cd66 /doc/conftest.py | |
parent | ed32022869ee87566d90fe0c843111acb7255d4c (diff) | |
download | numpy-5ee37b0e7966cd7181f3436a6758b19871d2597f.tar.gz |
Use empty lines for mpl_toolkits.mplot3d objects
Diffstat (limited to 'doc/conftest.py')
-rw-r--r-- | doc/conftest.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/conftest.py b/doc/conftest.py index 80a29487c..cfd65c1aa 100644 --- a/doc/conftest.py +++ b/doc/conftest.py @@ -13,10 +13,13 @@ matplotlib.use('agg', force=True) # https://github.com/wooyek/pytest-doctest-ellipsis-markers (MIT license) OutputChecker = doctest.OutputChecker +empty_line_markers = ['<matplotlib.', '<mpl_toolkits.mplot3d.'] class SkipMatplotlibOutputChecker(doctest.OutputChecker): def check_output(self, want, got, optionflags): - if '<matplotlib.' in got: - got = '' + for marker in empty_line_markers: + if marker in got: + got = '' + break return OutputChecker.check_output(self, want, got, optionflags) doctest.OutputChecker = SkipMatplotlibOutputChecker |