Beispiel #1
0
def test_fmtext():
    "Tet FMText base class"
    t = fmtxt.FMText('test')
    print t

    tuc = fmtxt.FMText(u'FMText with unicode: \x80abc')
    print str(tuc)

    ts = fmtxt.FMText((t, tuc, u'unicode: \x80abc'))

    print str(ts)
    print html(ts)
    print tex(ts)
Beispiel #2
0
def test_fmtext():
    "Tet FMText base class"
    t = fmtxt.FMText('test')
    print t

    tuc = fmtxt.FMText(u'FMText with unicode: \x80abc')
    print str(tuc)

    ts = fmtxt.FMText((t, tuc, u'unicode: \x80abc'))

    print str(ts)
    print html(ts)
    print tex(ts)
Beispiel #3
0
def test_eq():
    "Test equation factory"
    s = fmtxt.eq('t', 0.1234)
    eq_(str(s), "t = 0.12")
    eq_(html(s), "t = 0.12")
    eq_(tex(s), "$t = 0.12$")

    s = fmtxt.eq('t', 0.1234, 18)
    eq_(str(s), "t(18) = 0.12")
    eq_(html(s), "t<sub>18</sub> = 0.12")
    eq_(tex(s), "$t_{18} = 0.12$")

    s = fmtxt.peq(0.1299)
    eq_(str(s), "p = .130")
    eq_(html(s), "p = .130")
    eq_(tex(s), "$p = .130$")

    s = fmtxt.peq(0.0009)
    eq_(str(s), "p < .001")
    eq_(html(s), "p &lt; .001")
    eq_(tex(s), "$p < .001$")
Beispiel #4
0
def test_eq():
    "Test equation factory"
    s = fmtxt.eq('t', 0.1234)
    assert str(s) == "t = 0.12"
    assert html(s) == "t = 0.12"
    assert tex(s) == "$t = 0.12$"

    s = fmtxt.eq('t', 0.1234, 18)
    assert str(s) == "t(18) = 0.12"
    assert html(s) == "t<sub>18</sub> = 0.12"
    assert tex(s) == "$t_{18} = 0.12$"

    s = fmtxt.peq(0.1299)
    assert str(s) == "p = .130"
    assert html(s) == "p = .130"
    assert tex(s) == "$p = .130$"

    s = fmtxt.peq(0.0009)
    assert str(s) == "p < .001"
    assert html(s) == "p &lt; .001"
    assert tex(s) == "$p < .001$"
Beispiel #5
0
def test_eq():
    "Test equation factory"
    s = fmtxt.eq('t', 0.1234)
    eq_(str(s), "t = 0.12")
    eq_(html(s), "t = 0.12")
    eq_(tex(s), "$t = 0.12$")

    s = fmtxt.eq('t', 0.1234, 18)
    eq_(str(s), "t(18) = 0.12")
    eq_(html(s), "t<sub>18</sub> = 0.12")
    eq_(tex(s), "$t_{18} = 0.12$")

    s = fmtxt.peq(0.1299)
    eq_(str(s), "p = .130")
    eq_(html(s), "p = .130")
    eq_(tex(s), "$p = .130$")

    s = fmtxt.peq(0.0009)
    eq_(str(s), "p < .001")
    eq_(html(s), "p < .001")
    eq_(tex(s), "$p < .001$")
Beispiel #6
0
def test_fmtext():
    "Tet FMText base class"
    t = fmtxt.FMText('test')
    print(t)

    tuc = fmtxt.FMText('FMText with unicode: \x80abc')
    print(str(tuc))

    ts = fmtxt.FMText((t, tuc, 'unicode: \x80abc'))

    print(str(ts))
    print(html(ts))
    print(tex(ts))
def test_fmtext():
    "Tet FMText base class"
    t = fmtxt.FMText('test')
    print(t)

    tuc = fmtxt.FMText('FMText with unicode: \x80abc')
    print(str(tuc))

    ts = fmtxt.FMText((t, tuc, 'unicode: \x80abc'))

    print(str(ts))
    print(html(ts))
    print(tex(ts))
Beispiel #8
0
def test_symbol():
    "Test fmtxt.symbol()"
    s = fmtxt.symbol('t', 21)
    eq_(str(s), 't(21)')
    eq_(html(s), 't<sub>21</sub>')
    eq_(tex(s), '$t_{21}$')
Beispiel #9
0
def test_symbol():
    "Test fmtxt.symbol()"
    s = fmtxt.symbol('t', 21)
    assert str(s) == 't(21)'
    assert html(s) == 't<sub>21</sub>'
    assert tex(s) == '$t_{21}$'
Beispiel #10
0
def test_symbol():
    "Test fmtxt.symbol()"
    s = fmtxt.symbol('t', 21)
    eq_(str(s), 't(21)')
    eq_(html(s), 't<sub>21</sub>')
    eq_(tex(s), '$t_{21}$')