Skip to content

TST: computation/tests/test_eval.py #6069

@dsm054

Description

@dsm054

There are two strange things in computation/tests/test_eval.py.

First, in check_complex_cmp_op:

    elif _bool_and_frame(lhs, rhs):
        self.assertRaises(TypeError, _eval_single_bin, lhs_new, '&',
                          rhs_new, self.engine)
        self.assertRaises(TypeError, pd.eval, ex,
                          local_dict={'lhs': lhs, 'rhs': rhs},
                          engine=self.engine, parser=self.parser)

neither lhs_new nor rhs_new are defined (they're defined later on another branch). Probably they're meant to be simply lhs and rhs.

Second, in the subfunction check_operands:

                with assertRaises(NotImplementedError):
                    pd.eval(ex, engine=self.engine, parser=self.parser)

assertRaises isn't defined. This should probably be tm.assertRaises, as in the previous

            with tm.assertRaises(ValueError):
                pd.eval(ex, engine=self.engine, parser=self.parser)

I guess neither of these code paths are being exercised at the moment, which is why it hasn't been an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Testingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions