Skip to content

Commit

Permalink
Fix issue pydata#177
Browse files Browse the repository at this point in the history
  • Loading branch information
avalentino committed Aug 15, 2015
1 parent c6b0173 commit 0c2ef2e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions numexpr/tests/test_numexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 0c2ef2e

Please sign in to comment.