[numexpr] 06/09: Fix the test suite
Antonio Valentino
a_valentino-guest at moszumanska.debian.org
Sat Aug 15 11:07:02 UTC 2015
This is an automated email from the git hooks/post-receive script.
a_valentino-guest pushed a commit to branch master
in repository numexpr.
commit e48c6aa68d1c51153f86a3c30a370af2e9673e22
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date: Sat Aug 15 12:40:45 2015 +0200
Fix the test suite
---
debian/changelog | 1 +
debian/patches/0001-Fix-test-suite.patch | 40 ++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 42 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index a253d0c..40c9a73 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ numexpr (2.4.3-1) UNRELEASED; urgency=medium
- standards version bumped to 3.9.6 (no change)
- fix vcs-browser field
- drop deprecated XS-Testsuite parameter
+ * New patch for fixing the test suite (Python 3 only)
-- Antonio Valentino <antonio.valentino at tiscali.it> Tue, 23 Sep 2014 19:41:28 +0000
diff --git a/debian/patches/0001-Fix-test-suite.patch b/debian/patches/0001-Fix-test-suite.patch
new file mode 100644
index 0000000..1554b6e
--- /dev/null
+++ b/debian/patches/0001-Fix-test-suite.patch
@@ -0,0 +1,40 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sat, 15 Aug 2015 12:38:56 +0200
+Subject: Fix test suite
+
+---
+ numexpr/tests/test_numexpr.py | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/numexpr/tests/test_numexpr.py b/numexpr/tests/test_numexpr.py
+index 53dd284..6d49cc7 100644
+--- a/numexpr/tests/test_numexpr.py
++++ b/numexpr/tests/test_numexpr.py
+@@ -720,19 +720,19 @@ class test_strings(TestCase):
+ 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/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7bb1bc3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-test-suite.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/numexpr.git
More information about the debian-science-commits
mailing list