@onlyif_cmds_exist('latex', 'dvipng')
def test_latex_to_png_dvipng_runs():
 def mock_kpsewhich(filename):
  nt.assert_equal(filename, 'breqn.sty')
  return None
 for (s, wrap) in [(u'$$x^2$$', False), (u'x^2', True)]:
  (yield (latextools.latex_to_png_dvipng, s, wrap))
  with patch.object(latextools, 'kpsewhich', mock_kpsewhich):
   (yield (latextools.latex_to_png_dvipng, s, wrap))

@ onlyif_cmds_exist ( 'latex' , 'dvipng' ) def test_latex_to_png_dvipng_runs ( ) : def mock_kpsewhich ( filename ) : nt . assert_equal ( filename , 'breqn.sty' ) return None for ( s , wrap ) in [ ( u'$$x^2$$' , False ) , ( u'x^2' , True ) ] : ( yield ( latextools . latex_to_png_dvipng , s , wrap ) ) with patch . object ( latextools , 'kpsewhich' , mock_kpsewhich ) : ( yield ( latextools . latex_to_png_dvipng , s , wrap ) )
test that latex_to_png_dvipng just runs without error .