@@ -111,7 +111,7 @@ class TestTextRepr(testtools.TestCase):
111111 ("'" , '"\' "' , "'''\\ \n \\ ''''" ),
112112 ("\\ " , "'\\ \\ '" , "'''\\ \n \\ \\ '''" ),
113113 # DEL is also unprintable and should be escaped
114- ("\x7F " , "'\\ x7f'" , "'''\\ \n \\ x7f'''" ),
114+ ("\x7f " , "'\\ x7f'" , "'''\\ \n \\ x7f'''" ),
115115 # Character combinations that need double checking
116116 ("\r \n " , "'\\ r\\ n'" , "'''\\ \n \\ r\n '''" ),
117117 ("\" '" , "'\" \\ ''" , "'''\\ \n \" \\ ''''" ),
@@ -127,29 +127,29 @@ class TestTextRepr(testtools.TestCase):
127127 # Bytes with the high bit set should always be escaped
128128 bytes_examples = (
129129 (_b ("\x80 " ), "'\\ x80'" , "'''\\ \n \\ x80'''" ),
130- (_b ("\xA0 " ), "'\\ xa0'" , "'''\\ \n \\ xa0'''" ),
131- (_b ("\xC0 " ), "'\\ xc0'" , "'''\\ \n \\ xc0'''" ),
132- (_b ("\xFF " ), "'\\ xff'" , "'''\\ \n \\ xff'''" ),
133- (_b ("\xC2 \xA7 " ), "'\\ xc2\\ xa7'" , "'''\\ \n \\ xc2\\ xa7'''" ),
130+ (_b ("\xa0 " ), "'\\ xa0'" , "'''\\ \n \\ xa0'''" ),
131+ (_b ("\xc0 " ), "'\\ xc0'" , "'''\\ \n \\ xc0'''" ),
132+ (_b ("\xff " ), "'\\ xff'" , "'''\\ \n \\ xff'''" ),
133+ (_b ("\xc2 \xa7 " ), "'\\ xc2\\ xa7'" , "'''\\ \n \\ xc2\\ xa7'''" ),
134134 )
135135
136136 # Unicode doesn't escape printable characters as per the Python 3 model
137137 unicode_examples = (
138138 # C1 codes are unprintable
139139 ("\x80 " , "'\\ x80'" , "'''\\ \n \\ x80'''" ),
140- ("\x9F " , "'\\ x9f'" , "'''\\ \n \\ x9f'''" ),
140+ ("\x9f " , "'\\ x9f'" , "'''\\ \n \\ x9f'''" ),
141141 # No-break space is unprintable
142- ("\xA0 " , "'\\ xa0'" , "'''\\ \n \\ xa0'''" ),
142+ ("\xa0 " , "'\\ xa0'" , "'''\\ \n \\ xa0'''" ),
143143 # Letters latin alphabets are printable
144- ("\xA1 " , "'\xa1 '" , "'''\\ \n \xa1 '''" ),
145- ("\xFF " , "'\xff '" , "'''\\ \n \xff '''" ),
144+ ("\xa1 " , "'\xa1 '" , "'''\\ \n \xa1 '''" ),
145+ ("\xff " , "'\xff '" , "'''\\ \n \xff '''" ),
146146 ("\u0100 " , "'\u0100 '" , "'''\\ \n \u0100 '''" ),
147147 # Line and paragraph seperators are unprintable
148148 ("\u2028 " , "'\\ u2028'" , "'''\\ \n \\ u2028'''" ),
149149 ("\u2029 " , "'\\ u2029'" , "'''\\ \n \\ u2029'''" ),
150150 # Unpaired surrogates are unprintable
151- ("\uD800 " , "'\\ ud800'" , "'''\\ \n \\ ud800'''" ),
152- ("\uDFFF " , "'\\ udfff'" , "'''\\ \n \\ udfff'''" ),
151+ ("\ud800 " , "'\\ ud800'" , "'''\\ \n \\ ud800'''" ),
152+ ("\udfff " , "'\\ udfff'" , "'''\\ \n \\ udfff'''" ),
153153 # Unprintable general categories not fully tested: Cc, Cf, Co, Cn, Zs
154154 )
155155
0 commit comments