MCPcopy Create free account
hub / github.com/ipython/ipython / test_genelatex_wrap_with_breqn

Function test_genelatex_wrap_with_breqn

IPython/lib/tests/test_latextools.py:90–112  ·  view source on GitHub ↗

Test genelatex with wrap=True for the case breqn.sty is installed.

()

Source from the content-addressed store, hash-verified

88
89
90def test_genelatex_wrap_with_breqn():
91 """
92 Test genelatex with wrap=True for the case breqn.sty is installed.
93 """
94 def mock_kpsewhich(filename):
95 nt.assert_equal(filename, "breqn.sty")
96 return "path/to/breqn.sty"
97
98 with patch.object(latextools, "kpsewhich", mock_kpsewhich):
99 nt.assert_equal(
100 '\n'.join(latextools.genelatex("x^2", True)),
101 r'''\documentclass{article}
102\usepackage{amsmath}
103\usepackage{amsthm}
104\usepackage{amssymb}
105\usepackage{bm}
106\usepackage{breqn}
107\pagestyle{empty}
108\begin{document}
109\begin{dmath*}
110x^2
111\end{dmath*}
112\end{document}''')
113
114
115def test_genelatex_wrap_without_breqn():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected