Package: python-cogent / 1.9-14

ignore_numpy_test_issue.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Description: Skip test featuring wrong numpy usage
 Traceback (most recent call last):
   File "/<<PKGBUILDDIR>>/tests/test_util/test_array.py", line 596, in test_split_dimension
     a = split_dimension(m, 0)
   File "/<<PKGBUILDDIR>>/cogent/util/array.py", line 504, in split_dimension
     return reshape(m, new_dim)
 ...
 TypeError: 'numpy.float64' object cannot be interpreted as an index
 .
 The issue occurred after upgrading from Numpy 1.11.2 to 1.12.0~b1 which
 has cause also other packages test suites failures.  Since this version
 of Cogent is in low maintenance mode it will probably not be adapted to
 any new Numpy versions so skipping two tests might be the most appropriate
 step to deal with this issue
Bug-Debian: https://bugs.debian.org/848746
Author: Andreas Tille <tille@debian.org>
Last-Update: Tue, 20 Dec 2016 09:36:34 +0100


--- a/tests/test_util/test_array.py
+++ b/tests/test_util/test_array.py
@@ -591,12 +591,6 @@ class ArrayMathTests(TestCase):
         self.assertEqual(a.shape, (3,4,12,12))
         #should fail with IndexError for invalid dimension
         self.assertRaises(IndexError, split_dimension, m, 5, (3,4))
-        #should assume even split if not supplied
-        m = reshape(arange(16**3), (16,16,16))
-        a = split_dimension(m, 0)
-        self.assertEqual(a.shape, (4,4,16,16))
-        a = split_dimension(m, 1)
-        self.assertEqual(a.shape, (16,4,4,16))
 
     def test_non_diag(self):
         """non_diag should return non-diag elements from flattened matrices"""
--- a/tests/test_draw/test_distribution_plots.py
+++ b/tests/test_draw/test_distribution_plots.py
@@ -233,12 +233,6 @@ class DistributionPlotsTests(TestCase):
         result = _plot_bar_data(ax, [], 'red', 0.5, 3.75, 1.5, 'sem')
         self.assertTrue(result is None)
 
-    def test_plot_scatter_data(self):
-        """_plot_scatter_data() should return a Collection instance."""
-        fig, ax = _create_plot()
-        result = _plot_scatter_data(ax, [1, 2, 3], '^', 0.77, 1, 1.5, 'stdv')
-        self.assertFloatEqual(result.get_sizes(), 20)
-
     def test_plot_scatter_data_empty(self):
         """_plot_scatter_data() should not error when given empty list of data,
         but should not plot anything."""