##// END OF EJS Templates
Split transformer code
Split transformer code

File last commit:

r10386:6416b524
r10437:8f13741f
Show More
test_transformers.py
35 lines | 864 B | text/x-python | PythonLexer
Matthias BUSSONNIER
add test for transformer latex
r9880 import io
import nose.tools as nt
from nose.tools import nottest
Jonathan Frederic
Fixed test to reflect name change.
r10036 from converters.latex_transformer import rm_math_space
Matthias BUSSONNIER
add test for transformer latex
r9880
@nottest
def test_space(input, reference):
Jonathan Frederic
Fixed test to reflect name change.
r10036 nt.assert_equal(rm_math_space(input),reference)
Matthias BUSSONNIER
add test for transformer latex
r9880
def test_evens():
Matthias BUSSONNIER
fix latex_transformer and add test
r9888 unchanged = [
"""
you should be able to type
$ a single dollar and go to the line
it shouldn't be transformed.
"""
]
Matthias BUSSONNIER
add test for transformer latex
r9880 references = [
('$e$','$e$'),
('$ e $','$e$'),
('xxx$e^i$yyy','xxx$e^i$yyy'),
('xxx$ e^i $yyy','xxx$e^i$yyy'),
('xxx$e^i $yyy','xxx$e^i$yyy'),
('xxx$ e^i$yyy','xxx$e^i$yyy'),
('\$ e $ e $','\$ e $e$'),
Matthias BUSSONNIER
fix latex_transformer and add test
r9888 ('',''),
Matthias BUSSONNIER
add test for transformer latex
r9880 ]
for k,v in references :
yield test_space, k,v
Matthias BUSSONNIER
fix latex_transformer and add test
r9888
for unch in unchanged :
Jonathan Frederic
Fixed test to reflect name change.
r10036 yield test_space, unch, unch