@@ -471,7 +471,7 @@ def test_normalize_func_shall_return_exact_str(self):
471471 # See: https://github.com/python/cpython/issues/129569
472472 normalize = unicodedata .normalize
473473
474- class StrSub (str ):
474+ class MyStr (str ):
475475 pass
476476
477477 normalization_forms = ("NFC" , "NFKC" , "NFD" , "NFKD" )
@@ -483,15 +483,17 @@ class StrSub(str):
483483 with self .subTest (form = form ):
484484 self .assertIs (type (normalize (form , empty_str )), str )
485485 self .assertIs (type (normalize (form , ascii_str )), str )
486- self .assertIs (type (normalize (form , StrSub (empty_str ))), str )
487- self .assertIs (type (normalize (form , StrSub (ascii_str ))), str )
486+ self .assertIs (type (normalize (form , MyStr (empty_str ))), str )
487+ self .assertIs (type (normalize (form , MyStr (ascii_str ))), str )
488488
489489 # unnormalized strings
490490 strings_to_normalize = ("\u1e0b \u0323 " , "\ufb01 " , "\u1e69 " , "\u1e9b \u0323 " )
491- for form , input_str in zip (normalization_forms , strings_to_normalize ):
491+ for form , input_str in zip (
492+ normalization_forms , strings_to_normalize , strict = True
493+ ):
492494 with self .subTest (form = form , input_str = input_str ):
493495 self .assertIs (type (normalize (form , input_str )), str )
494- self .assertIs (type (normalize (form , StrSub (input_str ))), str )
496+ self .assertIs (type (normalize (form , MyStr (input_str ))), str )
495497
496498
497499if __name__ == "__main__" :
0 commit comments