does not guarantee that the validation_functions are restored. If any of the assertion fails, the code will be never retored. So, always, always call self.patch, like this:
* No need to change the following, but you should notice that all the calls to self.ui.hide will not be executed if the test fails. So, ideally, the hide() call should be right next to the show() call, as a cleanup call:
* Can you please add a docstring for the FakeValidationDict class?
* This code:
1103 + temp_function = self.ui. validation_ functions validation_ functions = FakeValidationD ict() validate_ data_on_ focus_changed( 1) (getattr( FakeValidationD ict, "valid0")) e(getattr( FakeValidationD ict, "valid1")) e(getattr( FakeValidationD ict, "valid2")) e(getattr( FakeValidationD ict, "valid3")) validation_ functions = temp_function
1104 + self.ui.
1105 + self.ui.
1106 + self.assertTrue
1107 + self.assertFals
1108 + self.assertFals
1109 + self.assertFals
1110 + self.ui.
does not guarantee that the validation_ functions are restored. If any of the assertion fails, the code will be never retored. So, always, always call self.patch, like this:
1104 + self.patch(self.ui, 'validation_ functions' , FakeValidationD ict())
if for some reason you can't use this, add a cleanup statement right after the assignment:
1103 + temp_function = self.ui. validation_ functions validation_ functions = FakeValidationD ict() (setattr, self.ui, 'validation_ functions' , temp_function)
1104 + self.ui.
1105 + self.addCleanup
* No need to change the following, but you should notice that all the calls to self.ui.hide will not be executed if the test fails. So, ideally, the hide() call should be right next to the show() call, as a cleanup call:
+ self.ui.show() (ui.hide)
+ self.addCleanup