mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 21:08:35 -07:00
dev-python/numexpr: add patch merged upstream to fix test failures
Package-Manager: portage-2.2.20
This commit is contained in:
34
dev-python/numexpr/files/numexpr-2.4.3-testfix.patch
Normal file
34
dev-python/numexpr/files/numexpr-2.4.3-testfix.patch
Normal file
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user