Closed
Description
https://travis-ci.org/pydata/pandas/jobs/134204278
I think #13311 broke some of these
here's some partial fixes
diff --git a/pandas/computation/tests/test_eval.py b/pandas/computation/tests/test_eval.py
index 4dc1e24..69b8830 100644
--- a/pandas/computation/tests/test_eval.py
+++ b/pandas/computation/tests/test_eval.py
@@ -248,7 +248,7 @@ class TestEvalNumexprPandas(tm.TestCase):
for ex in (ex1, ex2, ex3):
result = pd.eval(ex, engine=self.engine,
parser=self.parser)
- tm.assert_numpy_array_equal(result, expected)
+ tm.assert_almost_equal(result, expected)
def check_simple_cmp_op(self, lhs, cmp1, rhs):
ex = 'lhs {0} rhs'.format(cmp1)
@@ -265,7 +265,8 @@ class TestEvalNumexprPandas(tm.TestCase):
ex = 'lhs {0} rhs'.format(arith1)
result = pd.eval(ex, engine=self.engine, parser=self.parser)
expected = _eval_single_bin(lhs, arith1, rhs, self.engine)
- tm.assert_numpy_array_equal(result, expected)
+
+ tm.assert_almost_equal(result, expected)
ex = 'lhs {0} rhs {0} rhs'.format(arith1)
result = pd.eval(ex, engine=self.engine, parser=self.parser)
nlhs = _eval_single_bin(lhs, arith1, rhs,
@@ -280,8 +281,10 @@ class TestEvalNumexprPandas(tm.TestCase):
# TypeError, AttributeError: series or frame with scalar align
pass
else:
+
+ # direct numpy comparison
expected = self.ne.evaluate('nlhs {0} ghs'.format(op))
- tm.assert_numpy_array_equal(result, expected)
+ tm.assert_numpy_array_equal(result.values, expected)
# modulus, pow, and floor division require special casing