#NEWLINE# def test_exclusion_date( ) : #NEWLINE# #INDENT# rule = Rule ( recurrence . DAILY ) #NEWLINE# pattern = Recurrence ( dtstart = datetime ( 2014 , 1 , 2 , 0 , 0 , 0 ) , dtend = datetime ( 2014 , 1 , 4 , 0 , 0 , 0 ) , rrules = [ rule ] , exdates = [ datetime ( 2014 , 1 , 3 , 0 , 0 , 0 ) ] ) #NEWLINE# occurrences = [ instance for instance in pattern . occurrences ( ) ] #NEWLINE# assert ( occurrences == [ datetime ( 2014 , 1 , 2 , 0 , 0 , 0 ) , datetime ( 2014 , 1 , 4 , 0 , 0 , 0 ) ] ) #NEWLINE# assert ( 2 == pattern . count ( ) )