#NEWLINE# def test_is_before_failure( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# d2 = datetime . datetime . today ( ) #NEWLINE# assert_that ( d2 ) . is_before ( d2 . d1 ) #NEWLINE# fail ( 'should have raised error' ) #NEWLINE# #UNINDENT# except AssertionError as ex : #NEWLINE# #INDENT# assert_that ( str ( ex ) ) . matches ( 'Expected <\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}> to be before <\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}>, but was not.' )