Commits

Amaury Forgeot d'Arc committed 5eb1d1e

Correctly skip a test when host CPython is a narrow unicode build.

  • Participants
  • Parent commits cd09ce3

Comments (0)

Files changed (1)

File pypy/module/unicodedata/test_unicodedata.py

+import py
+import sys
 
 class AppTestUnicodeData:
     spaceconfig = dict(usemodules=('unicodedata',))
         import unicodedata
         raises(TypeError, unicodedata.normalize, 'x')
 
+    @py.test.mark.skipif("sys.maxunicode < 0x10ffff",
+                         reason="requires a 'wide' python build.")
     def test_normalize_wide(self):
-        import sys, unicodedata
-        if sys.maxunicode < 0x10ffff:
-            skip("requires a 'wide' python build.")
+        import unicodedata
         assert unicodedata.normalize('NFC', u'\U000110a5\U000110ba') == u'\U000110ab'
 
     def test_linebreaks(self):