jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/630932 )
Change subject: textlib_tests.py: split test_regexes ......................................................................
textlib_tests.py: split test_regexes
Divide test_regexes() in: - test_etp_regex() - test_nested_template_regex()
Change-Id: If0aa7f872e71df8abcc0f81ab6e52d309a34d133 --- M tests/textlib_tests.py 1 file changed, 4 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py index e3bdbd9..9f07b1f 100644 --- a/tests/textlib_tests.py +++ b/tests/textlib_tests.py @@ -587,8 +587,8 @@ self.assertEqual(func('{{a|{{c|{{d|{{e|}}}} }} }} foo {{b}}'), [(None, OrderedDict())])
- def test_regexes(self): - """Test _ETP_REGEX and NESTED_TEMPLATE_REGEX.""" + def test_etp_regex(self): + """Test _ETP_REGEX.""" func = textlib._ETP_REGEX.search
self.assertIsNotNone(func('{{{1}}}')) @@ -620,6 +620,8 @@ self.assertIsNone(func('{{a|{{c}} }}')) self.assertIsNone(func('{{a|{{c|d}} }}'))
+ def test_nested_template_regex(self): + """Test NESTED_TEMPLATE_REGEX.""" func = textlib.NESTED_TEMPLATE_REGEX.search
# Numerically named templates are rejected
pywikibot-commits@lists.wikimedia.org