Show More
@@ -26,6 +26,8 b' import numpy as np' | |||||
26 | from IPython.core.interactiveshell import InteractiveShell |
|
26 | from IPython.core.interactiveshell import InteractiveShell | |
27 | from .. import pylabtools as pt |
|
27 | from .. import pylabtools as pt | |
28 |
|
28 | |||
|
29 | from IPython.testing import decorators as dec | |||
|
30 | ||||
29 | #----------------------------------------------------------------------------- |
|
31 | #----------------------------------------------------------------------------- | |
30 | # Globals and constants |
|
32 | # Globals and constants | |
31 | #----------------------------------------------------------------------------- |
|
33 | #----------------------------------------------------------------------------- | |
@@ -53,8 +55,7 b' def test_figure_to_svg():' | |||||
53 | svg = pt.print_figure(fig, 'svg')[:100].lower() |
|
55 | svg = pt.print_figure(fig, 'svg')[:100].lower() | |
54 | nt.assert_in(b'doctype svg', svg) |
|
56 | nt.assert_in(b'doctype svg', svg) | |
55 |
|
57 | |||
56 | try: |
|
58 | @dec.skip_without("PIL.Image") | |
57 | from PIL import Image |
|
|||
58 |
|
|
59 | def test_figure_to_jpg(): | |
59 |
|
|
60 | # simple check for at least jpg-looking output | |
60 |
|
|
61 | fig = plt.figure() | |
@@ -63,8 +64,6 b' try:' | |||||
63 |
|
|
64 | plt.draw() | |
64 |
|
|
65 | jpg = pt.print_figure(fig, 'jpg')[:100].lower() | |
65 |
|
|
66 | assert jpg.startswith(b'\xff\xd8') | |
66 | except ImportError: |
|
|||
67 | pass |
|
|||
68 |
|
67 | |||
69 |
|
68 | |||
70 | def test_import_pylab(): |
|
69 | def test_import_pylab(): |
General Comments 0
You need to be logged in to leave comments.
Login now