[bug#70997] gnu: python-scikit-image: Disable test_ellipse_parameter_stability.

Message ID 0161703ca0ab9849780ee2d9d6acf9f4dfd74408.1715932852.git.mail@cbaines.net
State New
Headers
Series [bug#70997] gnu: python-scikit-image: Disable test_ellipse_parameter_stability. |

Commit Message

Christopher Baines May 17, 2024, 8 a.m. UTC
As it's flaky, see https://github.com/scikit-image/scikit-image/issues/7061

* gnu/packages/python-science.scm (python-scikit-image)[arguments]: Add 'patch
phase.

Change-Id: Ic1fc301eb0fad5330c34780ce096c446c1076824
---
 gnu/packages/python-science.scm | 7 +++++++
 1 file changed, 7 insertions(+)


base-commit: 0846eaecd45783bf40e8dc67b0c16f71068524b7
  

Comments

Sharlatan Hellseher May 17, 2024, 4 p.m. UTC | #1
Hi Christopher


I think you may add the test to ignore list without substituting it.

--8<---------------cut here---------------start------------->8---
#:test-flags #~(list "-k" "test_ellipse_parameter_stability")
--8<---------------cut here---------------end--------------->8---

--
Oleg
  
Christopher Baines May 26, 2024, 4:20 p.m. UTC | #2
Sharlatan Hellseher <sharlatanus@gmail.com> writes:

> I think you may add the test to ignore list without substituting it.
>
> --8<---------------cut here---------------start------------->8---
> #:test-flags #~(list "-k" "test_ellipse_parameter_stability")
> --8<---------------cut here---------------end--------------->8---

Thanks for the suggestion, I think that actually selects the test to
run, but adding not to the start seems to skip the named test, so I've
pushed this as a4a45669c76f80d5126add818df22f42547bb4a2.

Chris
  

Patch

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 861badad2e..d1a43b23ed 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -475,6 +475,13 @@  (define-public python-scikit-image
      (list
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch
+            (lambda _
+              ;; Disable flaky test
+              (substitute* "skimage/measure/tests/test_fit.py"
+                (("def test_ellipse_parameter_stability():")
+                 "@pytest.mark.xfail(reason=\"https://github.com/scikit-image/scikit-image/issues/7061\")
+def test_ellipse_parameter_stability():"))))
           (add-before 'build 'change-home-dir
             (lambda _
               ;; Change from /homeless-shelter to /tmp for write permission.