Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 20e103f

Browse files
committed
FIX: restore verbose attribute at top level
1 parent 85a3eb6 commit 20e103f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lib/matplotlib/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,11 @@ def ge(self, level):
388388
return self.vald[self.level] >= self.vald[level]
389389

390390

391+
with warnings.catch_warnings():
392+
warnings.simplefilter("ignore")
393+
verbose = Verbose()
394+
395+
391396
def _wrap(fmt, func, level=logging.DEBUG, always=True):
392397
"""
393398
return a callable function that wraps func and reports its

lib/matplotlib/tests/test_basic.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import six
44
import sys
55

6+
import matplotlib
7+
68

79
def test_simple():
810
assert 1 + 1 == 2
@@ -39,3 +41,7 @@ def test_override_builtins():
3941
overridden = True
4042

4143
assert not overridden
44+
45+
46+
def test_verbose():
47+
assert isinstance(matplotlib.verbose, matplotlib.Verbose)

0 commit comments

Comments
 (0)