unicode.py 881 Bytes
Newer Older
1 2
# coding=utf-8

3

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
class UnicodeTestMixin(object):
    def test_ascii(self):
        self._test_unicode_data(u"This post contains ASCII.")

    def test_latin_1(self):
        self._test_unicode_data(u"Thís pøst çòñtáins Lätin-1 tæxt")

    def test_CJK(self):
        self._test_unicode_data(u"イんノ丂 アo丂イ co刀イムノ刀丂 cフズ")

    def test_non_BMP(self):
        self._test_unicode_data(u"𝕋𝕙𝕚𝕤 𝕡𝕠𝕤𝕥 𝕔𝕠𝕟𝕥𝕒𝕚𝕟𝕤 𝕔𝕙𝕒𝕣𝕒𝕔𝕥𝕖𝕣𝕤 𝕠𝕦𝕥𝕤𝕚𝕕𝕖 𝕥𝕙𝕖 𝔹𝕄ℙ")

    def test_special_chars(self):
        self._test_unicode_data(u"\" This , post > contains < delimiter ] and [ other } special { characters ; that & may ' break things")

    def test_string_interp(self):
        self._test_unicode_data(u"This post contains %s string interpolation #{syntax}")