From 56f6028fffa323908813ac36fd8d9174226038e3 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Sun, 18 Sep 2016 09:36:16 -0500 Subject: [PATCH] Fix generator tests to run This class inheriting from TestCase caused the tests the yield fixture tests to not actually run. The new output is nosetests pandas/computation/tests/test_eval.py:TestTypeCasting ........................................ ---------------------------------------------------------------------- Ran 40 tests in 0.264s OK --- pandas/computation/tests/test_eval.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandas/computation/tests/test_eval.py b/pandas/computation/tests/test_eval.py index c50944f0a4d3b..02ed11c65706c 100644 --- a/pandas/computation/tests/test_eval.py +++ b/pandas/computation/tests/test_eval.py @@ -758,21 +758,21 @@ def check_chained_cmp_op(self, lhs, cmp1, mid, cmp2, rhs): # typecasting rules consistency with python # issue #12388 -class TestTypeCasting(tm.TestCase): +class TestTypeCasting(object): def check_binop_typecasting(self, engine, parser, op, dt): tm.skip_if_no_ne(engine) df = mkdf(5, 3, data_gen_f=f, dtype=dt) s = 'df {} 3'.format(op) res = pd.eval(s, engine=engine, parser=parser) - self.assertTrue(df.values.dtype == dt) - self.assertTrue(res.values.dtype == dt) + assert df.values.dtype == dt + assert res.values.dtype == dt assert_frame_equal(res, eval(s)) s = '3 {} df'.format(op) res = pd.eval(s, engine=engine, parser=parser) - self.assertTrue(df.values.dtype == dt) - self.assertTrue(res.values.dtype == dt) + assert df.values.dtype == dt + assert res.values.dtype == dt assert_frame_equal(res, eval(s)) def test_binop_typecasting(self):