Skip to content

TST: Unused codepaths in computation/tests/test_eval #5041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
jtratner opened this issue Sep 29, 2013 · 12 comments · Fixed by #6448
Closed
1 task

TST: Unused codepaths in computation/tests/test_eval #5041

jtratner opened this issue Sep 29, 2013 · 12 comments · Fixed by #6448
Labels
Refactor Internal refactoring of code Testing pandas testing functions or related to the test suite
Milestone

Comments

@jtratner
Copy link
Contributor

There are two places in test_eval where there are name errors (i.e., referring to items that aren't defined). Given that they don't raise errors, this means they aren't being used. I'm not sure whether this is because they're covered elsewhere or what, just need to make a decision.

From check_complex_cmp_ops

        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)

and also the second branch of check_operands in check_chained_cmp_ops

            if (np.isscalar(left) and np.isscalar(right) and
                    cmp_op in _bool_ops_syms):
                ex1 = 'lhs {0} mid {1} rhs'.format(cmp1, cmp2)
                ex2 = 'lhs {0} mid and mid {1} rhs'.format(cmp1, cmp2)
                ex3 = '(lhs {0} mid) & (mid {1} rhs)'.format(cmp1, cmp2)
                for ex in (ex1, ex2, ex3):
                    with assertRaises(NotImplementedError):
                        pd.eval(ex, engine=self.engine, parser=self.parser)
                return
  • test this function or remove it: _align_core_single_unary_op
@ghost ghost assigned cpcloud Sep 29, 2013
@cpcloud
Copy link
Member

cpcloud commented Sep 29, 2013

refactor label probably overkill but i put it there anyway

@cpcloud
Copy link
Member

cpcloud commented Sep 29, 2013

actually, those should be removed because i'm only testing float scalars there ...

@jreback
Copy link
Contributor

jreback commented Oct 7, 2013

@cpcloud ?

@cpcloud
Copy link
Member

cpcloud commented Oct 7, 2013

yep this iscoming along

@jreback
Copy link
Contributor

jreback commented Oct 14, 2013

@cpcloud ?

1 similar comment
@jreback
Copy link
Contributor

jreback commented Oct 21, 2013

@cpcloud ?

@jreback
Copy link
Contributor

jreback commented Oct 23, 2013

@jtratner ?

@jtratner
Copy link
Contributor Author

pushing to 0.14, it's an experimental feature anyway

@jreback
Copy link
Contributor

jreback commented Feb 18, 2014

@cpcloud keep open?

@jreback
Copy link
Contributor

jreback commented Feb 22, 2014

@cpcloud keep this open?

@cpcloud
Copy link
Member

cpcloud commented Feb 22, 2014

sorry didn't see ur comment ... i'll run coverage and see if things can be removed

@cpcloud
Copy link
Member

cpcloud commented Feb 22, 2014

turns out there's quite a bit of dead code in eval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Internal refactoring of code Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants