예제 #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)", ())
예제 #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)", ())
예제 #3
0
파일: test_dot.py 프로젝트: msgoff/sympy
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)", ())
예제 #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)", ())
예제 #5
0
def test_purestr():
    assert purestr(Symbol('x')) == "Symbol(x)"
    assert purestr(Basic(1, 2)) == "Basic(1, 2)"
예제 #6
0
파일: test_dot.py 프로젝트: Lenqth/sympy
def test_purestr():
    assert purestr(Symbol('x')) == "Symbol(x)"
    assert purestr(Basic(1, 2)) == "Basic(1, 2)"