X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/637475880b35561e349a4a5df3048256cb58fb76..f2f48f5d59a7a5d247786e4a5e19ed05c4f751dc:/tests/test_latex.py diff --git a/tests/test_latex.py b/tests/test_latex.py new file mode 100644 index 0000000..22db615 --- /dev/null +++ b/tests/test_latex.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# +# This file is part of Librarian, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# + +from nose.tools import * +from librarian.latex import LatexFragment +import os + +def test_latex_to_png(): + lf = LatexFragment("$ \sum_{i = 0}^{123} n_i^{3}$") + name1 = lf.filename + assert_equal(name1.find("/"), -1) + name = lf.path + assert_true(os.path.exists(name)) + print os.stat(name) + assert_true(os.stat(name).st_size > 0) + lf.remove()