-
Notifications
You must be signed in to change notification settings - Fork 482
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
Fix a minor bug in superduper typer #521
Fix a minor bug in superduper typer #521
Conversation
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.
Thanks so much for doing this, particularly in writing the test.
There's one more error I'd like you to correct while you are here - in my code. :-D
return sum(hasattr(item, a) for a in cls.attrs) == count
should be
return sum(hasattr(item, a) for a in cls.attrs) >= count
.
It hasn't yet made a difference, but it's logically correct, so...
def test_mongodb_typer(self, test_db): | ||
assert MongoDbTyper.accept(test_db.db) is True | ||
|
||
def test_sklearn_typer( |
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.
One line pls.
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.
comment?
from superduperdb.misc.superduper import MongoDbTyper, SklearnTyper, TorchTyper | ||
|
||
|
||
class TestSuperDuper: |
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.
No need for this class at all! That's from when we used to use unittest
, back in the old, old, old days.
Make these all static functions, get rid of self
, outdent them, pytest will do the rest.
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.
sure :) thanks
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.
Good stuff!
Description
resolves #520
Related Issue(s)
Checklist
sphinx
format docstrings added or updated.Additional Notes