jenkins-bot has submitted this change and it was merged.
Change subject: textlib_tests.py: restore value before self.assert ......................................................................
textlib_tests.py: restore value before self.assert
If assert statement raises an error, the correct value is not resored. Move restoring of value before self.assert statement.
Change-Id: Iffea89f8910bd05001e2b1480ce89b491276a632 --- M tests/textlib_tests.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py index 49d5e5f..cafa378 100644 --- a/tests/textlib_tests.py +++ b/tests/textlib_tests.py @@ -172,8 +172,9 @@ sep = config.LS config.line_separator = '' # use an empty separator temporarily new = textlib.replaceCategoryLinks(old, cats, site=self.site) + # restore the default separator + config.line_separator = sep self.assertEqual(old, new) - config.line_separator = sep # restore the default separator
class TestTemplatesInCategory(TestCase):
pywikibot-commits@lists.wikimedia.org