Blob Blame History Raw
From 7c131e7487c39d30d278b0f07e59b80ee04a6f0d Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Thu, 21 Sep 2023 10:35:47 -0400
Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20use=20nose.tools.assert=5Fequal?=
 =?UTF-8?q?s?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Use nose.tools.assert_equal instead.

Since unittest.TestCase.assertEquals is a deprecated alias for
unittest.TestCase.TestCase.assertEqual, and is removed in Python 3.12,
and since the nose.tools assertion names are apparently automagically
generated from the unittest.TestCase assertion methods,
nose.tools.assert_equals is also removed in Python 3.12 (when nose is
otherwise patched to work with Python 3.12).
---
 nipy/labs/datasets/tests/test_converters.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nipy/labs/datasets/tests/test_converters.py b/nipy/labs/datasets/tests/test_converters.py
index 98aff00da0..55451625ec 100644
--- a/nipy/labs/datasets/tests/test_converters.py
+++ b/nipy/labs/datasets/tests/test_converters.py
@@ -18,9 +18,9 @@ def test_conversion():
 
     brifti_obj = nib.load(data_file)
     vol_img = as_volume_img(data_file)
-    yield nose.tools.assert_equals, as_volume_img(vol_img), \
+    yield nose.tools.assert_equal, as_volume_img(vol_img), \
                     vol_img
-    yield nose.tools.assert_equals, as_volume_img(brifti_obj), \
+    yield nose.tools.assert_equal, as_volume_img(brifti_obj), \
                     vol_img
 
 
@@ -42,7 +42,7 @@ def test_save():
     import nifti
     def test_from_nifti():
         nim = nifti.NiftiImage(data_file)
-        yield nose.tools.assert_equals, as_volume_img(data_file), \
+        yield nose.tools.assert_equal, as_volume_img(data_file), \
                     as_volume_img(nim)
 
 except ImportError: