Show More
@@ -16,6 +16,7 b' Authors:' | |||||
16 |
|
16 | |||
17 | from IPython.lib.latextools import latex_to_png |
|
17 | from IPython.lib.latextools import latex_to_png | |
18 | from IPython.testing import decorators as dec |
|
18 | from IPython.testing import decorators as dec | |
|
19 | # use @dec.skipif_not_sympy to skip tests requiring sympy | |||
19 |
|
20 | |||
20 | try: |
|
21 | try: | |
21 | from sympy import pretty, latex |
|
22 | from sympy import pretty, latex | |
@@ -27,7 +28,6 b' except ImportError:' | |||||
27 | # Definitions of magic functions for use with IPython |
|
28 | # Definitions of magic functions for use with IPython | |
28 | #----------------------------------------------------------------------------- |
|
29 | #----------------------------------------------------------------------------- | |
29 |
|
30 | |||
30 | @dec.skipif_not_sympy |
|
|||
31 | def print_basic_unicode(o, p, cycle): |
|
31 | def print_basic_unicode(o, p, cycle): | |
32 | """A function to pretty print sympy Basic objects.""" |
|
32 | """A function to pretty print sympy Basic objects.""" | |
33 | if cycle: |
|
33 | if cycle: | |
@@ -38,7 +38,6 b' def print_basic_unicode(o, p, cycle):' | |||||
38 | p.text(out) |
|
38 | p.text(out) | |
39 |
|
39 | |||
40 |
|
40 | |||
41 | @dec.skipif_not_sympy |
|
|||
42 | def print_png(o): |
|
41 | def print_png(o): | |
43 | """A funciton to display sympy expression using LaTex -> PNG.""" |
|
42 | """A funciton to display sympy expression using LaTex -> PNG.""" | |
44 | s = latex(o, mode='inline') |
|
43 | s = latex(o, mode='inline') | |
@@ -51,7 +50,6 b' def print_png(o):' | |||||
51 |
|
50 | |||
52 | _loaded = False |
|
51 | _loaded = False | |
53 |
|
52 | |||
54 | @dec.skipif_not_sympy |
|
|||
55 | def load_ipython_extension(ip): |
|
53 | def load_ipython_extension(ip): | |
56 | """Load the extension in IPython.""" |
|
54 | """Load the extension in IPython.""" | |
57 | global _loaded |
|
55 | global _loaded |
General Comments 0
You need to be logged in to leave comments.
Login now