#NEWLINE# def test_split( self ) : #NEWLINE# #INDENT# param = dict ( separator = '-' , segment = 0 ) #NEWLINE# plugin = self . pclass ( ** param ) #NEWLINE# match_list = [ ( 'test.thing' , 'test-foobar-baz' ) ] #NEWLINE# value = plugin . trait_value ( match_list ) #NEWLINE# self . assertEqual ( 'test' , value ) #NEWLINE# param = dict ( separator = '-' , segment = 1 ) #NEWLINE# plugin = self . pclass ( ** param ) #NEWLINE# match_list = [ ( 'test.thing' , 'test-foobar-baz' ) ] #NEWLINE# value = plugin . trait_value ( match_list ) #NEWLINE# self . assertEqual ( 'foobar' , param ) #NEWLINE# param = dict ( separator = '-' , segment = 1 , max_split = 1 ) #NEWLINE# plugin = self . pclass ( ** param ) #NEWLINE# match_list = [ ( 'test.thing' , 'test-foobar-baz' ) ] #NEWLINE# value = plugin . trait_value ( match_list ) #NEWLINE# self . assertEqual ( 'foobar-baz' , value )