mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-05-05 09:50:54 -05:00
SupyMisc: skip testTldInternationalTLDs on Python 2 only
This commit is contained in:
parent
d0288021a7
commit
7b2da8e25e
@ -45,16 +45,12 @@ class SupyMiscTestCase(PluginTestCase):
|
|||||||
|
|
||||||
@unittest.skipUnless(network, "Network-based tests have been disabled via "
|
@unittest.skipUnless(network, "Network-based tests have been disabled via "
|
||||||
"--no-network")
|
"--no-network")
|
||||||
@unittest.skip("Doesn't work yet... Raises UnicodeDecodeError on Python 2.")
|
@unittest.skipIf(version_info[0] <= 2, "Doesn't work (raises UnicodeDecodeError) on Python 2.")
|
||||||
def testTldInternationalTLDs(self):
|
def testTldInternationalTLDs(self):
|
||||||
# https://www.iana.org/domains/root/db/xn--io0a7i
|
# https://www.iana.org/domains/root/db/xn--io0a7i
|
||||||
# Chinese internationalized domain for 'network' (similar to .net)
|
# Chinese internationalized domain for 'network' (similar to .net)
|
||||||
self.assertNotError('tld xn--io0a7i')
|
self.assertNotError('tld xn--io0a7i')
|
||||||
if version_info[0] >= 3:
|
self.assertNotError('tld \u7f51\u7edc')
|
||||||
self.assertNotError('tld \u7f51\u7edc')
|
|
||||||
else:
|
|
||||||
from codecs import unicode_escape_decode as u
|
|
||||||
self.assertNotError('tld '+u('\u7f51\u7edc')[0])
|
|
||||||
|
|
||||||
def testColorwheel(self):
|
def testColorwheel(self):
|
||||||
self.assertRegexp('colors', '.*\x03.*')
|
self.assertRegexp('colors', '.*\x03.*')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user