#NEWLINE# def test_before_after_sort_1( self ) : #NEWLINE# #INDENT# ' Does the before-after sort work?\n        ' #NEWLINE# items = [ TestItem ( 1 ) , TestItem ( 2 ) , TestItem ( 3 , before = 2 ) , TestItem ( 4 , after = 1 ) , TestItem ( 5 ) ] #NEWLINE# actual = before_after_sort ( items ) #NEWLINE# desired = [ TestItem ( 1 ) , TestItem ( 3 ) , TestItem ( 4 ) , TestItem ( 2 ) , TestItem ( 5 ) ] #NEWLINE# self . assertEquals ( actual , desired )