commit: aaab8fcd6ed41cbce7f58a0a47f75f49e51b6d21
Author: Horea Christian <chr <AT> chymera <DOT> eu>
AuthorDate: Thu May 25 18:28:24 2023 +0000
Commit: Horea Christian <horea.christ <AT> gmail <DOT> com>
CommitDate: Thu May 25 18:28:24 2023 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=aaab8fcd
dev-vcs/dandi-cli: fixed tests
Signed-off-by: Horea Christian <chr <AT> chymera.eu>
dev-vcs/dandi-cli/dandi-cli-0.55.0-r1.ebuild | 6 ++---
dev-vcs/dandi-cli/dandi-cli-0.55.1.ebuild | 6 ++---
.../dandi-cli/files/dandi-cli-0.55.0-hdf5.patch | 29 ++++++++++++++++++++++
3 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/dev-vcs/dandi-cli/dandi-cli-0.55.0-r1.ebuild
b/dev-vcs/dandi-cli/dandi-cli-0.55.0-r1.ebuild
index 6dc1301c4..060424cdb 100644
--- a/dev-vcs/dandi-cli/dandi-cli-0.55.0-r1.ebuild
+++ b/dev-vcs/dandi-cli/dandi-cli-0.55.0-r1.ebuild
@@ -65,10 +65,8 @@ BDEPEND="
S="${WORKDIR}/${MY_P}"
-# Reported upstream:
-# https://github.com/dandi/dandi-cli/issues/1297
-EPYTEST_DESELECT=(
- dandi/tests/test_files.py::test_validate_bogus
+PATCHES=(
+ "${FILESDIR}/${PN}-0.55.0-hdf5.patch"
)
distutils_enable_tests pytest
diff --git a/dev-vcs/dandi-cli/dandi-cli-0.55.1.ebuild
b/dev-vcs/dandi-cli/dandi-cli-0.55.1.ebuild
index ad8849482..beb2ffcc7 100644
--- a/dev-vcs/dandi-cli/dandi-cli-0.55.1.ebuild
+++ b/dev-vcs/dandi-cli/dandi-cli-0.55.1.ebuild
@@ -65,10 +65,8 @@ BDEPEND="
S="${WORKDIR}/${MY_P}"
-# Reported upstream:
-# https://github.com/dandi/dandi-cli/issues/1297
-EPYTEST_DESELECT=(
- dandi/tests/test_files.py::test_validate_bogus
+PATCHES=(
+ "${FILESDIR}/${PN}-0.55.0-hdf5.patch"
)
distutils_enable_tests pytest
diff --git a/dev-vcs/dandi-cli/files/dandi-cli-0.55.0-hdf5.patch
b/dev-vcs/dandi-cli/files/dandi-cli-0.55.0-hdf5.patch
new file mode 100644
index 000000000..4cd55ca7e
--- /dev/null
+++ b/dev-vcs/dandi-cli/files/dandi-cli-0.55.0-hdf5.patch
@@ -0,0 +1,29 @@
+From d16bf0855e9ef7c029e8aca969ddfa04c1d7fdfd Mon Sep 17 00:00:00 2001
+From: "John T. Wodder II" <[email protected]>
+Date: Thu, 25 May 2023 14:17:36 -0400
+Subject: [PATCH] Fix test for newer hdf5
+
+---
+ dandi/tests/test_files.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/dandi/tests/test_files.py b/dandi/tests/test_files.py
+index 4dbf0f223..3e44cf6b1 100644
+--- a/dandi/tests/test_files.py
++++ b/dandi/tests/test_files.py
+@@ -374,7 +374,14 @@ def test_validate_bogus(tmp_path):
+ errors = dandi_file(path).get_validation_errors()
+ # ATM we would get 2 errors -- since could not be open in two places,
+ # but that would be too rigid to test. Let's just see that we have
expected errors
+- assert any(e.message.startswith("Unable to open file") for e in errors)
++ assert any(
++ e.message.startswith(
++ ("Unable to open file", "Unable to synchronously open file")
++ )
++ for e in errors
++ )
++ # Recent versions of hdf5 changed the error message, hence the need to
++ # check for two different patterns.
+
+
+ def test_upload_zarr(new_dandiset, tmp_path):