Example #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]))")
Example #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]))")
Example #3
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]))")
Example #4
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}))
Example #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}))
def test_Sort_postprocess():
    opt = {'sort': 'x > y'}
    Sort.postprocess(opt)

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

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

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