@@ -3155,7 +3155,8 @@ def test_encode_error(self):
31553155 ('[\x80 \xff \u20ac ]' , 'ignore' , b'[]' ),
31563156 ('[\x80 \xff \u20ac ]' , 'replace' , b'[???]' ),
31573157 ('[\x80 \xff \u20ac ]' , 'xmlcharrefreplace' , b'[€ÿ€]' ),
3158- ('[\x80 \xff \u20ac ]' , 'backslashreplace' , b'[\\ x80\\ xff\\ u20ac]' ),
3158+ ('[\x80 \xff \u20ac \U000abcde ]' , 'backslashreplace' ,
3159+ b'[\\ x80\\ xff\\ u20ac\\ U000abcde]' ),
31593160 ('[\udc80 \udcff ]' , 'surrogateescape' , b'[\x80 \xff ]' ),
31603161 ):
31613162 with self .subTest (data = data , error_handler = error_handler ,
@@ -3197,7 +3198,8 @@ def test_encode_errors(self):
31973198 for data , error_handler , expected in (
31983199 ('[\u20ac \udc80 ]' , 'ignore' , b'[]' ),
31993200 ('[\u20ac \udc80 ]' , 'replace' , b'[??]' ),
3200- ('[\u20ac \udc80 ]' , 'backslashreplace' , b'[\\ u20ac\\ udc80]' ),
3201+ ('[\u20ac \U000abcde ]' , 'backslashreplace' ,
3202+ b'[\\ u20ac\\ U000abcde]' ),
32013203 ('[\u20ac \udc80 ]' , 'xmlcharrefreplace' , b'[€�]' ),
32023204 ('[\udc80 \udcff ]' , 'surrogateescape' , b'[\x80 \xff ]' ),
32033205 ):
0 commit comments