@@ -174,7 +174,7 @@ def test_bytes_repr_type1():
174
174
175
175
def test_bytes_repr_type1a ():
176
176
obj_repr = join_bytes_repr (Zip [Json ])
177
- assert re .match (rb"type:\(fileformats.application.Zip\[.{16}\] \)" , obj_repr )
177
+ assert re .match (rb"type:\(fileformats.application.archive.Json__Zip \)" , obj_repr )
178
178
179
179
180
180
def test_bytes_repr_type2 ():
@@ -199,17 +199,19 @@ def test_bytes_special_form2():
199
199
200
200
def test_bytes_special_form3 ():
201
201
obj_repr = join_bytes_repr (ty .Optional [Path ])
202
- assert re .match (rb"type:\(typing.Optional \[.{16 }\]\)" , obj_repr )
202
+ assert re .match (rb"type:\(typing.Union \[.{32 }\]\)" , obj_repr , flags = re . DOTALL )
203
203
204
204
205
205
def test_bytes_special_form4 ():
206
206
obj_repr = join_bytes_repr (ty .Type [Path ])
207
- assert re .match (rb"type:\(builtins.type\[.{16}\]\)" , obj_repr )
207
+ assert re .match (rb"type:\(builtins.type\[.{16}\]\)" , obj_repr , flags = re . DOTALL )
208
208
209
209
210
210
def test_bytes_special_form5 ():
211
211
obj_repr = join_bytes_repr (ty .Callable [[Path , int ], ty .Tuple [float , str ]])
212
- assert re .match (rb"type:\(typing.Callable\[.{16}\]\)" , obj_repr )
212
+ assert re .match (
213
+ rb"type:\(collections.abc.Callable\[.{32}\]\)" , obj_repr , flags = re .DOTALL
214
+ )
213
215
assert obj_repr != join_bytes_repr (ty .Callable [[Path , int ], ty .Tuple [float , bytes ]])
214
216
215
217
0 commit comments