Skip to content

Commit 957bc0e

Browse files
committed
allow missing space
1 parent 5faee94 commit 957bc0e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/test_bioimageio_spec_version.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@ def test_bioimageio_spec_version(mamba_cmd: Optional[str]):
2929
# get currently pinned bioimageio.spec version
3030
meta = metadata("bioimageio.core")
3131
req = meta["Requires-Dist"]
32-
assert req.startswith("bioimageio.spec ==")
33-
spec_ver = req[len("bioimageio.spec ==") :]
32+
valid_starts = ("bioimageio.spec ==", "bioimageio.spec==")
33+
for start in valid_starts:
34+
if req.startswith(start):
35+
spec_ver = req[len(start) :]
36+
break
37+
else:
38+
raise ValueError(
39+
f"Expected bioimageio.sepc pin to start with any of {valid_starts}"
40+
)
41+
3442
assert spec_ver.count(".") == 3
3543
pmaj, pmin, ppatch, post = spec_ver.split(".")
3644
assert (

0 commit comments

Comments
 (0)