-
Notifications
You must be signed in to change notification settings - Fork 80
Moving setitem to the base class #1044
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
Moving setitem to the base class #1044
Conversation
self.tester['column that does not exist'] = 0.3 | ||
self.assertEqual(self.tester['center_name'], 'ANL') | ||
self.tester['center_name'] = "FOO" | ||
self.assertEqual(self.tester['center_name'], "FOO") |
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 also needs a test for when a column has the wrong datatype, triggering the ValueError.
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 is a great point! When I wrote the test I noticed that there is a "bug" on the code (it is just preventing a useful message, therefore quoted). I'm fixing it right now.
Couple comments. |
""", (column,))[0] | ||
value_type = type(value).__name__ | ||
|
||
if column_type != value_type: |
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 seems to be comparing SQL types (column_type) and python type (value_type). Is that kosher?
Changes Unknown when pulling 380057e on josenavas:unify-sample-setitem into * on biocore:master*. |
💥 ready for another round of review! |
👍 |
Moving setitem to the base class
I just move the code to the base class and updated the SQL to make use of the class variables to fill the sql correctly.