#NEWLINE# def test_joined_string_regex( ) : #NEWLINE# #INDENT# schema = JoinedString . using ( separator = ', ' , separator_regex = re . compile ( 'X*,X*' ) ) #NEWLINE# el = schema ( 'abc' ) #NEWLINE# assert ( el . value == 'abc' ) #NEWLINE# assert ( [ child . value for child in el ] == [ 'abc' ] ) #NEWLINE# el = schema ( 'abcX,Xdef' ) #NEWLINE# assert ( el . value == 'abc, def' ) #NEWLINE# assert ( [ child . value for child in el ] == [ 'abc' , 'def' ] )