jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1081480?usp=email )
Change subject: [tests] test utils.expected_failure_if decorator ......................................................................
[tests] test utils.expected_failure_if decorator
Change-Id: Ica11663eed755878ce997b70e63867c861859eb8 --- M tests/tests_tests.py 1 file changed, 10 insertions(+), 0 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/tests_tests.py b/tests/tests_tests.py index c426a70..4ccd012 100755 --- a/tests/tests_tests.py +++ b/tests/tests_tests.py @@ -95,6 +95,16 @@ self.assertTrue(utils.entered_loop(self.pattern)) self.assertFalse(utils.entered_loop(''))
+ @utils.expected_failure_if(True) + def test_expected_failure_true(self): + """Test expected_failure_if decorator if condition is True.""" + self.assertTrue(False) + + @utils.expected_failure_if(False) + def test_expected_failure_false(self): + """Test expected_failure_if decorator if condition is False.""" + self.assertTrue(True) +
if __name__ == '__main__': with suppress(SystemExit):
pywikibot-commits@lists.wikimedia.org