Skip to content

Decrease output when running pytest -s. #18422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ def setup(self, fig, outfile, dpi=None, frame_prefix=None,
self._temp_paths = list()
self.fname_format_str = '%s%%07d.%s'

def __del__(self):
if self._tmpdir:
self._tmpdir.cleanup()

@cbook.deprecated("3.3")
@property
def clear_temp(self):
Expand Down
13 changes: 3 additions & 10 deletions lib/matplotlib/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def test_simple():

def test_override_builtins():
import pylab

ok_to_override = {
'__name__',
'__doc__',
Expand All @@ -23,15 +22,9 @@ def test_override_builtins():
'sum',
'divmod'
}
overridden = False
for key in dir(pylab):
if key in dir(builtins):
if (getattr(pylab, key) != getattr(builtins, key) and
key not in ok_to_override):
print("'%s' was overridden in globals()." % key)
overridden = True

assert not overridden
overridden = {key for key in {*dir(pylab)} & {*dir(builtins)}
if getattr(pylab, key) != getattr(builtins, key)}
assert overridden <= ok_to_override


def test_lazy_imports():
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/tests/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,7 @@ def test_text_as_text_opacity():
def test_text_repr():
# smoketest to make sure text repr doesn't error for category
plt.plot(['A', 'B'], [1, 2])
txt = plt.text(['A'], 0.5, 'Boo')
print(txt)
repr(plt.text(['A'], 0.5, 'Boo'))


def test_annotation_update():
Expand Down