コード例 #1
0
def test_Wrt_preprocess():
    Wrt.preprocess(x) == ["x"]
    Wrt.preprocess("x,y") == ["x", "y"]
    Wrt.preprocess("x y") == ["x", "y"]
    Wrt.preprocess("x, y") == ["x", "y"]
    Wrt.preprocess([x, y]) == ["x", "y"]

    raises(OptionError, "Wrt.preprocess(0)")
コード例 #2
0
def test_Wrt_preprocess():
    Wrt.preprocess(x) == ['x']
    Wrt.preprocess('x,y') == ['x', 'y']
    Wrt.preprocess('x y') == ['x', 'y']
    Wrt.preprocess('x, y') == ['x', 'y']
    Wrt.preprocess([x, y]) == ['x', 'y']

    raises(OptionError, "Wrt.preprocess(0)")
コード例 #3
0
def test_Wrt_preprocess():
    assert Wrt.preprocess(x) == ['x']
    assert Wrt.preprocess('') == []
    assert Wrt.preprocess(' ') == []
    assert Wrt.preprocess('x,y') == ['x', 'y']
    assert Wrt.preprocess('x y') == ['x', 'y']
    assert Wrt.preprocess('x, y') == ['x', 'y']
    assert Wrt.preprocess('x , y') == ['x', 'y']
    assert Wrt.preprocess(' x, y') == ['x', 'y']
    assert Wrt.preprocess(' x,  y') == ['x', 'y']
    assert Wrt.preprocess([x, y]) == ['x', 'y']

    raises(OptionError, "Wrt.preprocess(',')")
    raises(OptionError, "Wrt.preprocess(0)")
コード例 #4
0
ファイル: test_polyoptions.py プロジェクト: 101man/sympy
def test_Wrt_preprocess():
    assert Wrt.preprocess(x) == ['x']
    assert Wrt.preprocess('') == []
    assert Wrt.preprocess(' ') == []
    assert Wrt.preprocess('x,y') == ['x', 'y']
    assert Wrt.preprocess('x y') == ['x', 'y']
    assert Wrt.preprocess('x, y') == ['x', 'y']
    assert Wrt.preprocess('x , y') == ['x', 'y']
    assert Wrt.preprocess(' x, y') == ['x', 'y']
    assert Wrt.preprocess(' x,  y') == ['x', 'y']
    assert Wrt.preprocess([x, y]) == ['x', 'y']

    raises(OptionError, "Wrt.preprocess(',')")
    raises(OptionError, "Wrt.preprocess(0)")
コード例 #5
0
def test_Wrt_postprocess():
    opt = {'wrt': ['x']}
    Wrt.postprocess(opt)

    assert opt == {'wrt': ['x']}
コード例 #6
0
def test_Wrt_postprocess():
    opt = {'wrt': ['x']}
    Wrt.postprocess(opt)

    assert opt == {'wrt': ['x']}
コード例 #7
0
def test_Wrt_postprocess():
    opt = {"wrt": ["x"]}
    Wrt.postprocess(opt)

    assert opt == {"wrt": ["x"]}