commit:     3a2800caf0688e4bb9c813a239a939b678ea798a
Author:     Horea Christian <chr <AT> chymera <DOT> eu>
AuthorDate: Thu Feb  2 03:01:52 2023 +0000
Commit:     Horea Christian <horea.christ <AT> gmail <DOT> com>
CommitDate: Thu Feb  2 03:01:52 2023 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=3a2800ca

dev-python/heudiconv: fixed tests

Signed-off-by: Horea Christian <chr <AT> chymera.eu>

 .../heudiconv/files/heudiconv-0.11.6-gitenv.patch   | 21 +++++++++++++++++++++
 dev-python/heudiconv/heudiconv-0.11.6-r1.ebuild     | 17 ++++-------------
 2 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/dev-python/heudiconv/files/heudiconv-0.11.6-gitenv.patch 
b/dev-python/heudiconv/files/heudiconv-0.11.6-gitenv.patch
new file mode 100644
index 000000000..27bc441aa
--- /dev/null
+++ b/dev-python/heudiconv/files/heudiconv-0.11.6-gitenv.patch
@@ -0,0 +1,21 @@
+From 0c30781248e0c1f2d437e0dfd923a74d7e647411 Mon Sep 17 00:00:00 2001
+From: Horea Christian <c...@chymera.eu>
+Date: Wed, 1 Feb 2023 21:34:58 -0500
+Subject: [PATCH] Setting git author and email in test environment
+
+---
+ heudiconv/tests/conftest.py | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 heudiconv/tests/conftest.py
+
+diff --git /dev/null b/heudiconv/tests/conftest.py
+new file mode 100644
+index 00000000..f4f47d16
+--- /dev/null
++++ b/heudiconv/tests/conftest.py
+@@ -0,0 +1,5 @@
++import os
++os.environ["GIT_AUTHOR_EMAIL"] = "m...@example.com"
++os.environ["GIT_AUTHOR_NAME"] = "Max Mustermann"
++os.environ["GIT_COMMITTER_EMAIL"] = "m...@example.com"
++os.environ["GIT_COMMITTER_NAME"] = "Max Mustermann"

diff --git a/dev-python/heudiconv/heudiconv-0.11.6-r1.ebuild 
b/dev-python/heudiconv/heudiconv-0.11.6-r1.ebuild
index 11b98367e..847424235 100644
--- a/dev-python/heudiconv/heudiconv-0.11.6-r1.ebuild
+++ b/dev-python/heudiconv/heudiconv-0.11.6-r1.ebuild
@@ -33,19 +33,10 @@ BDEPEND="
        )
 "
 
-# Reported upstream:
-# https://github.com/nipy/heudiconv/issues/627
-EPYTEST_DESELECT=(
-       "heudiconv/tests/test_dicoms.py::test_embed_dicom_and_nifti_metadata"
-       "heudiconv/tests/test_heuristics.py::test_reproin_largely_smoke"
-       "heudiconv/tests/test_heuristics.py::test_scans_keys_reproin"
-       "heudiconv/tests/test_heuristics.py::test_scout_conversion"
-       "heudiconv/tests/test_heuristics.py::test_notop[bidsoptions0]"
-       "heudiconv/tests/test_heuristics.py::test_notop[bidsoptions1]"
-       "heudiconv/tests/test_heuristics.py::test_phoenix_doc_conversion"
-       "heudiconv/tests/test_main.py::test_prepare_for_datalad"
-       "heudiconv/tests/test_main.py::test_cache"
-       "heudiconv/tests/test_regression.py::test_grouping[merged]"
+# Patch sumbitted upstream, check if removal possible in next release:
+# https://github.com/nipy/heudiconv/pull/631
+PATCHES=(
+       "${FILESDIR}/${P}-gitenv.patch"
 )
 
 distutils_enable_tests pytest

Reply via email to