@@ -61,12 +61,12 @@ def idfn(fixture_value):
6161 (builder .stringIn , "" , "" , str ),
6262 (builder .stringOut , b"abc" , "abc" , str ),
6363 (builder .stringIn , b"abc" , "abc" , str ),
64- (builder .stringOut , b"a\xcf b" , "a�b" , str ), # Invalid UTF-8
65- (builder .stringIn , b"a\xcf b" , "a�b" , str ), # Invalid UTF-8
66- (builder .stringOut , b"a\xe2 \x82 \xac b" , "a€b" , str ), # Valid UTF-8
67- (builder .stringIn , b"a\xe2 \x82 \xac b" , "a€b" , str ), # Valid UTF-8
68- (builder .stringOut , "a€b" , "a€b" , str ), # Valid UTF-8
69- (builder .stringIn , "a€b" , "a€b" , str ), # Valid UTF-8
64+ (builder .stringOut , b"a\xcf b" , u "a�b" , str ), # Invalid UTF-8
65+ (builder .stringIn , b"a\xcf b" , u "a�b" , str ), # Invalid UTF-8
66+ (builder .stringOut , b"a\xe2 \x82 \xac b" , u "a€b" , str ), # Valid UTF-8
67+ (builder .stringIn , b"a\xe2 \x82 \xac b" , u "a€b" , str ), # Valid UTF-8
68+ (builder .stringOut , u "a€b" , u "a€b" , str ), # Valid UTF-8
69+ (builder .stringIn , u "a€b" , u "a€b" , str ), # Valid UTF-8
7070 (
7171 builder .stringOut ,
7272 "this string is much longer than 40 characters" ,
@@ -157,10 +157,6 @@ def record_value_asserts(
157157 "Arrays not equal: {} {}" .format (actual_value , expected_value )
158158 assert type (actual_value ) == expected_type
159159 else :
160- # Python2 handles UTF-8 differently so needs extra encoding
161- if sys .version_info < (3 ,) and expected_type == str :
162- expected_value = expected_value .decode ("utf-8" , errors = "replace" )
163-
164160 assert actual_value == expected_value
165161 assert type (actual_value ) == expected_type
166162
0 commit comments