コード例 #1
0
def test_Sort_preprocess():
    assert Sort.preprocess([x, y, z]) == ['x', 'y', 'z']
    assert Sort.preprocess((x, y, z)) == ['x', 'y', 'z']

    assert Sort.preprocess('x > y > z') == ['x', 'y', 'z']
    assert Sort.preprocess('x>y>z') == ['x', 'y', 'z']

    raises(OptionError, "Sort.preprocess(0)")
    raises(OptionError, "Sort.preprocess(set([x, y, z]))")
コード例 #2
0
def test_Sort_preprocess():
    assert Sort.preprocess([x, y, z]) == ["x", "y", "z"]
    assert Sort.preprocess((x, y, z)) == ["x", "y", "z"]

    assert Sort.preprocess("x > y > z") == ["x", "y", "z"]
    assert Sort.preprocess("x>y>z") == ["x", "y", "z"]

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

    assert Sort.preprocess('x > y > z') == ['x', 'y', 'z']
    assert Sort.preprocess('x>y>z') == ['x', 'y', 'z']

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

    assert Sort.preprocess('x > y > z') == ['x', 'y', 'z']
    assert Sort.preprocess('x>y>z') == ['x', 'y', 'z']

    raises(OptionError, lambda: Sort.preprocess(0))
    raises(OptionError, lambda: Sort.preprocess({x, y, z}))
コード例 #5
0
def test_Sort_preprocess():
    assert Sort.preprocess([x, y, z]) == ['x', 'y', 'z']
    assert Sort.preprocess((x, y, z)) == ['x', 'y', 'z']

    assert Sort.preprocess('x > y > z') == ['x', 'y', 'z']
    assert Sort.preprocess('x>y>z') == ['x', 'y', 'z']

    raises(OptionError, lambda: Sort.preprocess(0))
    raises(OptionError, lambda: Sort.preprocess({x, y, z}))
コード例 #6
0
def test_Sort_postprocess():
    opt = {'sort': 'x > y'}
    Sort.postprocess(opt)

    assert opt == {'sort': 'x > y'}
コード例 #7
0
def test_Sort_postprocess():
    opt = {'sort': 'x > y'}
    Sort.postprocess(opt)

    assert opt == {'sort': 'x > y'}
コード例 #8
0
def test_Sort_postprocess():
    opt = {"sort": "x > y"}
    Sort.postprocess(opt)

    assert opt == {"sort": "x > y"}