Skip to content

Commit 2abf6fe

Browse files
committed
fixed up hashing checks for special forms tests
1 parent fa2929b commit 2abf6fe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pydra/utils/tests/test_hash.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def test_bytes_repr_type1():
174174

175175
def test_bytes_repr_type1a():
176176
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)
178178

179179

180180
def test_bytes_repr_type2():
@@ -199,17 +199,19 @@ def test_bytes_special_form2():
199199

200200
def test_bytes_special_form3():
201201
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)
203203

204204

205205
def test_bytes_special_form4():
206206
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)
208208

209209

210210
def test_bytes_special_form5():
211211
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+
)
213215
assert obj_repr != join_bytes_repr(ty.Callable[[Path, int], ty.Tuple[float, bytes]])
214216

215217

0 commit comments

Comments
 (0)