Skip to content

Commit 2a5c747

Browse files
TomAugspurgerjreback
authored andcommitted
Fix generator tests to run (pandas-dev#14245)
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
1 parent db9dc65 commit 2a5c747

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/computation/tests/test_eval.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -758,21 +758,21 @@ def check_chained_cmp_op(self, lhs, cmp1, mid, cmp2, rhs):
758758
# typecasting rules consistency with python
759759
# issue #12388
760760

761-
class TestTypeCasting(tm.TestCase):
761+
class TestTypeCasting(object):
762762

763763
def check_binop_typecasting(self, engine, parser, op, dt):
764764
tm.skip_if_no_ne(engine)
765765
df = mkdf(5, 3, data_gen_f=f, dtype=dt)
766766
s = 'df {} 3'.format(op)
767767
res = pd.eval(s, engine=engine, parser=parser)
768-
self.assertTrue(df.values.dtype == dt)
769-
self.assertTrue(res.values.dtype == dt)
768+
assert df.values.dtype == dt
769+
assert res.values.dtype == dt
770770
assert_frame_equal(res, eval(s))
771771

772772
s = '3 {} df'.format(op)
773773
res = pd.eval(s, engine=engine, parser=parser)
774-
self.assertTrue(df.values.dtype == dt)
775-
self.assertTrue(res.values.dtype == dt)
774+
assert df.values.dtype == dt
775+
assert res.values.dtype == dt
776776
assert_frame_equal(res, eval(s))
777777

778778
def test_binop_typecasting(self):

0 commit comments

Comments
 (0)