Ejemplo n.º 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']

    pytest.raises(OptionError, lambda: Sort.preprocess(0))
    pytest.raises(OptionError, lambda: Sort.preprocess({x, y, z}))
Ejemplo n.º 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']

    pytest.raises(OptionError, lambda: Sort.preprocess(0))
    pytest.raises(OptionError, lambda: Sort.preprocess({x, y, z}))
Ejemplo n.º 3
0
def test_Sort_postprocess():
    opt = {'sort': 'x > y'}
    Sort.postprocess(opt)

    assert opt == {'sort': 'x > y'}
Ejemplo n.º 4
0
def test_Sort_postprocess():
    opt = {'sort': 'x > y'}
    Sort.postprocess(opt)

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