8000 Adding TODO: note about the lazy-loading not working from the compare… · matplotlib/matplotlib@1969adc · GitHub
[go: up one dir, main page]

Skip to content

Commit 1969adc

Browse files
gpoulterNeil
authored andcommitted
Adding TODO: note about the lazy-loading not working from the compare images decorator for backends that aren't already loaded.
1 parent 19d5029 commit 1969adc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,6 +1719,12 @@ def get_width_height(self):
17191719
# classes inherit from FigureCanvasBase
17201720
# b) so we don't import a bunch of stuff the user may never use
17211721

1722+
# TODO: these print_* throw ImportErrror when called from
1723+
# compare_images_decorator (decorators.py line 112)
1724+
# if the backend has not already been loaded earlier on. Simple trigger:
1725+
# >>> import matplotlib.tests.test_spines
1726+
# >>> list(matplotlib.tests.test_spines.test_spines_axes_positions())[0][0]()
1727+
17221728
def print_emf(self, *args, **kwargs):
17231729
from backends.backend_emf import FigureCanvasEMF # lazy import
17241730
emf = self.switch_backends(FigureCanvasEMF)

0 commit comments

Comments
 (0)
0