Skip to content

Commit

Permalink
Merge pull request #260 from datalad/fix-datalad-version-determination
Browse files Browse the repository at this point in the history
fix the determination of the datalad version
  • Loading branch information
christian-monch authored Jun 28, 2022
2 parents 61f64de + 383d781 commit 19b2665
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion datalad_metalad/extractors/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ def test_plainest(path):
# Expect an exception if no dataset exists. Depending on the
# dataset version ValueError or NoDatasetFound is raised.
from datalad import __version__
major, minor, patch = tuple(map(int, __version__.split(".")))
major, minor, patch = tuple(
map(
lambda s: int(s.split("+")[0]),
__version__.split(".")[0:3]
)
)

if major == 0 and minor <= 15:
expected_exception = ValueError
Expand Down

0 comments on commit 19b2665

Please sign in to comment.