diff options
author | Ian Delaney <idella4@gentoo.org> | 2015-08-19 14:59:43 +0800 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2015-08-19 15:00:31 +0800 |
commit | 262ee4db31e1258580005824bcd6d6d1ba164f11 (patch) | |
tree | 00c7efad4d66038ffa843ea4d88f83b8dad5378a /dev-python/numexpr | |
parent | fa5ac7db85145c72617a40cc3216f1f2a57a8417 (diff) | |
download | gentoo-262ee4db31e1258580005824bcd6d6d1ba164f11.tar.gz gentoo-262ee4db31e1258580005824bcd6d6d1ba164f11.tar.xz |
dev-python/numexpr: add patch merged upstream to fix test failures
Package-Manager: portage-2.2.20
Diffstat (limited to 'dev-python/numexpr')
-rw-r--r-- | dev-python/numexpr/files/numexpr-2.4.3-testfix.patch | 34 | ||||
-rw-r--r-- | dev-python/numexpr/numexpr-2.4.3.ebuild | 4 |
2 files changed, 36 insertions, 2 deletions
diff --git a/dev-python/numexpr/files/numexpr-2.4.3-testfix.patch b/dev-python/numexpr/files/numexpr-2.4.3-testfix.patch new file mode 100644 index 00000000000..3104ddcc3dd --- /dev/null +++ b/dev-python/numexpr/files/numexpr-2.4.3-testfix.patch @@ -0,0 +1,34 @@ +https://github.com/avalentino/numexpr/commit/0c2ef2ed05185211d2dd90a193c26f1805c30ad4 +diff --git a/numexpr/tests/test_numexpr.py b/numexpr/tests/test_numexpr.py +index 44761c3..e7e109f 100644 +--- a/numexpr/tests/test_numexpr.py ++++ b/numexpr/tests/test_numexpr.py +@@ -721,19 +721,19 @@ def test_add_string_array(self): + self.assert_missing_op('add_sss', expr, locals()) + + def test_empty_string1(self): +- a = np.array(["", "pepe"]) +- b = np.array(["pepe2", ""]) +- res = evaluate("(a == '') & (b == 'pepe2')") ++ a = np.array([b"", b"pepe"]) ++ b = np.array([b"pepe2", b""]) ++ res = evaluate("(a == b'') & (b == b'pepe2')") + assert_array_equal(res, np.array([True, False])) +- res2 = evaluate("(a == 'pepe') & (b == '')") ++ res2 = evaluate("(a == b'pepe') & (b == b'')") + assert_array_equal(res2, np.array([False, True])) + + def test_empty_string2(self): +- a = np.array(["p", "pepe"]) +- b = np.array(["pepe2", ""]) +- res = evaluate("(a == '') & (b == 'pepe2')") ++ a = np.array([b"p", b"pepe"]) ++ b = np.array([b"pepe2", b""]) ++ res = evaluate("(a == b'') & (b == b'pepe2')") + assert_array_equal(res, np.array([False, False])) +- res2 = evaluate("(a == 'pepe') & (b == '')") ++ res2 = evaluate("(a == b'pepe') & (b == b'')") + assert_array_equal(res, np.array([False, False])) + + def test_add_numeric_array(self): + diff --git a/dev-python/numexpr/numexpr-2.4.3.ebuild b/dev-python/numexpr/numexpr-2.4.3.ebuild index 40aa4ecea9d..34e62183e34 100644 --- a/dev-python/numexpr/numexpr-2.4.3.ebuild +++ b/dev-python/numexpr/numexpr-2.4.3.ebuild @@ -23,6 +23,8 @@ RDEPEND=" DEPEND="${RDEPEND} dev-python/setuptools[${PYTHON_USEDEP}]" +PATCHES=( "${FILESDIR}"/${P}-testfix.patch ) + python_prepare_all() { # TODO: mkl can be used but it fails for me # only works with mkl in tree. newer mkl will use pkgconfig @@ -46,8 +48,6 @@ python_compile() { } python_test() { - # https://github.com/pydata/numexpr/issues/177 - # there are 2 known test failures under py3 only pushd "${BUILD_DIR}"/lib > /dev/null "${PYTHON}" -c "import numexpr; numexpr.test()" || die pushd > /dev/null |