#NEWLINE# def test_is_equal_to_ignoring_time_failure( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# d2 = ( datetime . datetime . today ( ) + datetime . timedelta ( days = 1 ) ) #NEWLINE# assert_that ( self . d1 ) . is_equal_to_ignoring_time ( d2 ) #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}> to be equal to <\\d{4}-\\d{2}-\\d{2}>, but was not.' )