Esempio n. 1
0
def test_purestr():
    assert purestr(Symbol('x')) == "Symbol('x')"
    assert purestr(Basic(1, 2)) == "Basic(1, 2)"
    assert purestr(Float(2)) == "Float('2.0', precision=53)"

    assert purestr(Symbol('x'), with_args=True) == ("Symbol('x')", ())
    assert purestr(Basic(1, 2), with_args=True) == ('Basic(1, 2)', ('1', '2'))
    assert purestr(Float(2), with_args=True) == \
        ("Float('2.0', precision=53)", ())
Esempio n. 2
0
def test_purestr():
    assert purestr(Symbol('x')) == "Symbol('x')"
    assert purestr(Basic(1, 2)) == "Basic(1, 2)"
    assert purestr(Float(2)) == "Float('2.0', precision=53)"

    assert purestr(Symbol('x'), with_args=True) == ("Symbol('x')", ())
    assert purestr(Basic(1, 2), with_args=True) == ('Basic(1, 2)', ('1', '2'))
    assert purestr(Float(2), with_args=True) == \
        ("Float('2.0', precision=53)", ())
Esempio n. 3
0
def test_purestr():
    assert purestr(Symbol("x")) == "Symbol('x')"
    assert purestr(Basic(1, 2)) == "Basic(1, 2)"
    assert purestr(Float(2)) == "Float('2.0', precision=53)"

    assert purestr(Symbol("x"), with_args=True) == ("Symbol('x')", ())
    assert purestr(Basic(1, 2), with_args=True) == ("Basic(1, 2)", ("1", "2"))
    assert purestr(Float(2),
                   with_args=True) == ("Float('2.0', precision=53)", ())
Esempio n. 4
0
def test_purestr():
    assert purestr(Symbol('x')) == "Symbol('x')"
    assert purestr(Basic(S(1), S(2))) == "Basic(Integer(1), Integer(2))"
    assert purestr(Float(2)) == "Float('2.0', precision=53)"

    assert purestr(Symbol('x'), with_args=True) == ("Symbol('x')", ())
    assert purestr(Basic(S(1), S(2)), with_args=True) == \
            ('Basic(Integer(1), Integer(2))', ('Integer(1)', 'Integer(2)'))
    assert purestr(Float(2), with_args=True) == \
        ("Float('2.0', precision=53)", ())
Esempio n. 5
0
def test_purestr():
    assert purestr(Symbol('x')) == "Symbol(x)"
    assert purestr(Basic(1, 2)) == "Basic(1, 2)"
Esempio n. 6
0
def test_purestr():
    assert purestr(Symbol('x')) == "Symbol(x)"
    assert purestr(Basic(1, 2)) == "Basic(1, 2)"