diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-17 11:36:49 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-17 11:36:49 +0100 |
commit | e2db47eaae00ec33f8971db44b68645c5d3b9590 (patch) | |
tree | 3ec0cf16ddb5854017e134fabebe14bf8cb94a34 /dev-python/quantities/files | |
parent | 616579b5d773c50af31ee56f00105d96ce641ca2 (diff) |
gentoo resync : 17.08.2021
Diffstat (limited to 'dev-python/quantities/files')
-rw-r--r-- | dev-python/quantities/files/quantities-0.12.5-numpy-1.21.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dev-python/quantities/files/quantities-0.12.5-numpy-1.21.patch b/dev-python/quantities/files/quantities-0.12.5-numpy-1.21.patch new file mode 100644 index 000000000000..34dd5a075412 --- /dev/null +++ b/dev-python/quantities/files/quantities-0.12.5-numpy-1.21.patch @@ -0,0 +1,29 @@ +From f32e0ce2feeb588eb8b7236700c8c1176e2bc499 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Tue, 17 Aug 2021 08:24:07 +0200 +Subject: [PATCH] fix expected np.arctan2() exception for numpy 1.21 + +NumPy 1.21 has changed the exception type for incorrect np.arctan2() +arguments from ValueError to TypeError. Adjust the test appropriately. + +Fixes #190 +--- + quantities/tests/test_umath.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/quantities/tests/test_umath.py b/quantities/tests/test_umath.py +index f5aeb78..a7ebb18 100644 +--- a/quantities/tests/test_umath.py ++++ b/quantities/tests/test_umath.py +@@ -226,7 +226,7 @@ class TestUmath(TestCase): + np.arctan2(3*pq.V, 3*pq.V), + np.radians(45)*pq.dimensionless + ) +- self.assertRaises(ValueError, np.arctan2, (1*pq.m, 1*pq.m)) ++ self.assertRaises((TypeError, ValueError), np.arctan2, (1*pq.m, 1*pq.m)) + + def test_hypot(self): + self.assertQuantityEqual(np.hypot(3 * pq.m, 4 * pq.m), 5 * pq.m) +-- +2.32.0 + |