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