jenkins-bot has submitted this change and it was merged.
Change subject: [IMPROV] chars tests: Check Unicode version ......................................................................
[IMPROV] chars tests: Check Unicode version
Instead of just checking if Python 2 or Python 3 it's checking if the Unicode version is below 6.3 when U+180e was in the category Zs.
Change-Id: I74b65977f2774b17c7d78d5ae8a27bed6bbf8684 --- M tests/tools_chars_tests.py 1 file changed, 4 insertions(+), 3 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved XZise: Looks good to me, but someone else must approve jenkins-bot: Verified
diff --git a/tests/tools_chars_tests.py b/tests/tools_chars_tests.py index 4c44b55..5e2006b 100644 --- a/tests/tools_chars_tests.py +++ b/tests/tools_chars_tests.py @@ -9,8 +9,9 @@
__version__ = '$Id$'
-import sys import unicodedata + +from distutils.version import StrictVersion
from pywikibot.tools import chars
@@ -41,8 +42,8 @@ cat = unicodedata.category(char) if cat not in ('Cf', 'Cn'): invalid[char] = cat - if sys.version_info[0] == 2: - # This category has changed between Unicode 6 and 7 to Cf + if StrictVersion(unicodedata.unidata_version) < StrictVersion('6.3'): + # This category has changed with Unicode 6.3 to Cf self.assertEqual(invalid.pop('\u180e'), 'Zs') self.assertCountEqual(invalid.items(), [])
pywikibot-commits@lists.wikimedia.org