def test_genelatex_wrap_with_breqn():
 def mock_kpsewhich(filename):
  nt.assert_equal(filename, 'breqn.sty')
  return 'path/to/breqn.sty'
 with patch.object(latextools, 'kpsewhich', mock_kpsewhich):
  nt.assert_equal('\n'.join(latextools.genelatex('x^2', True)), '\\documentclass{article}\n\\usepackage{amsmath}\n\\usepackage{amsthm}\n\\usepackage{amssymb}\n\\usepackage{bm}\n\\usepackage{breqn}\n\\pagestyle{empty}\n\\begin{document}\n\\begin{dmath*}\nx^2\n\\end{dmath*}\n\\end{document}')

def test_genelatex_wrap_with_breqn ( ) : def mock_kpsewhich ( filename ) : nt . assert_equal ( filename , 'breqn.sty' ) return 'path/to/breqn.sty' with patch . object ( latextools , 'kpsewhich' , mock_kpsewhich ) : nt . assert_equal ( '\n' . join ( latextools . genelatex ( 'x^2' , True ) ) , '\\documentclass{article}\n\\usepackage{amsmath}\n\\usepackage{amsthm}\n\\usepackage{amssymb}\n\\usepackage{bm}\n\\usepackage{breqn}\n\\pagestyle{empty}\n\\begin{document}\n\\begin{dmath*}\nx^2\n\\end{dmath*}\n\\end{document}' )
test genelatex with wrap=true for the case breqn .