Skip to content

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

Merged
merged 3 commits into from
Apr 9, 2015

Conversation

josenavas
Copy link
Contributor

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.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 79.12% when pulling e46ea59 on josenavas:unify-sample-setitem into 2199bdd on biocore:master.

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")
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@squirrelo
Copy link
Contributor

Couple comments.

""", (column,))[0]
value_type = type(value).__name__

if column_type != value_type:
Copy link
Contributor

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?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) to 79.12% when pulling 8474ca4 on josenavas:unify-sample-setitem into 2199bdd on biocore:master.

@josenavas josenavas mentioned this pull request Apr 8, 2015
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 380057e on josenavas:unify-sample-setitem into * on biocore:master*.

@josenavas
Copy link
Contributor Author

💥 ready for another round of review!

@ElDeveloper
Copy link
Contributor

👍

ElDeveloper added a commit that referenced this pull request Apr 9, 2015
@ElDeveloper ElDeveloper merged commit adff033 into qiita-spots:master Apr 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants