-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
CLN/BUG/TST: Fix and test multiple places using undefined names. #5045
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
Conversation
@@ -893,7 +888,7 @@ def _has_valid_type(self, key, axis): | |||
return True | |||
|
|||
else: | |||
|
|||
# TODO: Figure out why this is unused, should it be returned? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will raise if necessary, otherwise its ok
@jtratner when you have a chance rebase this....and can put it in |
Well, the main goal here was to point out where we don't have test coverage |
@@ -170,10 +171,10 @@ def _align_core(terms): | |||
|
|||
return typ, _zip_axes_from_type(typ, axes) | |||
|
|||
|
|||
# TODO: Add tests that cover this function! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpcloud this function is never used in any tests, is it necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not ... i'll add it to the unused codepaths issue
@jtratner looks ok to put in...? |
I don't expect this PR to be merged, goal was to find places where there's untested code (so eventually everything here should be addressed separately). I recall waiting to hear back on the date start/stop stuff, I'll take another look and see. You covered the pytables elements already, which is good. |
Actually can you check that all the pytables code referenced with comments, (i.e., the TODOs or not used parts) are either removed or now have tests in master? Last I checked, the issues with |
@jtratner so....let's just move to 0.14...(or you can create an issue to remind to do this kind of analysis ) |
If they're legacy code, then I guess we can just fix the NameErrors (didn't
|
yep....it was actually pretty tricky to come up with a case where the original code failed...you actually have to reset the timezone in python to do it. Bottom line is that these guys are using |
Okay, sounds good. A couple more things that need fixing and I'll take a Maybe leave a note on the tests that they're testing deprecated behavior |
well..its not really deprecated per se, just generated differently in current version that prior version (in theory I should actually bump the version number of the generated HDFStore files, but since it can be handled both ways its not necessary) |
@jtratner anything left on this? |
* Add TODOs to places that are clearly not tested (b/c they had undefined names) and fix the undefined names * Add TODOs to unused names.
Does not appear to ever have been used, even when class was first created. Not sure what it was meant to be for.
at this point, I'm assuming this can be closed. |
ok... |
Pyflakes revealed that there are a number of places using undefined
names. I've tried to fix them where I can; however, those parts of the
code are also clearly untested (or tested with
assertRaises(Exception,...)
) so they need some love.The PyTables code had a bunch of places with undefined
TermValue
, asdid stats/misc.
Finally, I've also noted (or removed) various places where variables
were assigned but then not used.
cc @jreback