172 + save_button = self.main_window.get_event_save_button() 173 + self.assertThat(lambda: save_button, Eventually(NotEquals(None)))
179 + title_label = self.main_window.get_title_label(eventTitle) 180 + self.assertThat(lambda: title_label, Eventually(NotEquals(None)))
This is not doing what you think it does: because 'save_button' and 'title_label' are assigned before defining the lambda function, they contain static values, so the lambda is useless. For it to be useful, you need to use it like that:
lambda: self.main_window.get_event_save_button() lambda: self.main_window.get_title_label(eventTitle)
And since you’re comparing to None, instead of using Equals (or NotEquals), you should use the identity matcher, Is, like that:
self.assertThat(…, Eventually(Not(Is(None))))
« Back to merge proposal
172 + save_button = self.main_ window. get_event_ save_button( ) (lambda: save_button, Eventually( NotEquals( None)))
173 + self.assertThat
179 + title_label = self.main_ window. get_title_ label(eventTitl e) (lambda: title_label, Eventually( NotEquals( None)))
180 + self.assertThat
This is not doing what you think it does: because 'save_button' and 'title_label' are assigned before defining the lambda function, they contain static values, so the lambda is useless. For it to be useful, you need to use it like that:
lambda: self.main_ window. get_event_ save_button( ) window. get_title_ label(eventTitl e)
lambda: self.main_
And since you’re comparing to None, instead of using Equals (or NotEquals), you should use the identity matcher, Is, like that:
self. assertThat( …, Eventually( Not(Is( None))) )