summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-11-16 12:11:55 +0100
committerJustin Lecher <jlec@gentoo.org>2015-11-16 12:12:45 +0100
commit48d6128e4748e88bce06c1ab675ee69f80fe9b66 (patch)
treec2083f23cab3490f17c24ee20d27b4d7a02c9622 /dev-python/pandas/files
parentsys-fs/aufs-util: Bump to latest aufs release (diff)
downloadgentoo-48d6128e4748e88bce06c1ab675ee69f80fe9b66.tar.gz
gentoo-48d6128e4748e88bce06c1ab675ee69f80fe9b66.tar.bz2
gentoo-48d6128e4748e88bce06c1ab675ee69f80fe9b66.zip
dev-python/pandas: Backport test fix
Package-Manager: portage-2.2.23 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'dev-python/pandas/files')
-rw-r--r--dev-python/pandas/files/pandas-0.17.0-testfix-backport.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/dev-python/pandas/files/pandas-0.17.0-testfix-backport.patch b/dev-python/pandas/files/pandas-0.17.0-testfix-backport.patch
new file mode 100644
index 000000000000..c83319256f22
--- /dev/null
+++ b/dev-python/pandas/files/pandas-0.17.0-testfix-backport.patch
@@ -0,0 +1,28 @@
+ pandas/tests/test_categorical.py | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/pandas/tests/test_categorical.py b/pandas/tests/test_categorical.py
+old mode 100755
+new mode 100644
+index e97010e..1d14323
+--- a/pandas/tests/test_categorical.py
++++ b/pandas/tests/test_categorical.py
+@@ -86,12 +86,14 @@ class TestCategorical(tm.TestCase):
+ factor = Categorical.from_array(arr, ordered=False)
+ self.assertFalse(factor.ordered)
+
+- # this however will raise as cannot be sorted
+- # but fixed in newer versions of numpy
+- if LooseVersion(np.__version__) < "1.10":
++ if compat.PY3:
+ self.assertRaises(TypeError, lambda : Categorical.from_array(arr, ordered=True))
+ else:
+- Categorical.from_array(arr, ordered=True)
++ # this however will raise as cannot be sorted (on PY3 or older numpies)
++ if LooseVersion(np.__version__) < "1.10":
++ self.assertRaises(TypeError, lambda : Categorical.from_array(arr, ordered=True))
++ else:
++ Categorical.from_array(arr, ordered=True)
+
+ def test_is_equal_dtype(self):
+