Antar1011 / Onix

The Pokemon Data-Mining Package
http://onix.readthedocs.io/en/latest/
GNU General Public License v3.0
7 stars 0 forks source link

Integration test #61

Closed Antar1011 closed 8 years ago

Antar1011 commented 8 years ago

In writing this test, I've discovered a major bug owing to how SQLAlchemy compiles queries. Basically, the current scheme will not work for a full species-lookup. It also won't handle bulk inserts.

See: http://stackoverflow.com/questions/7106016/too-many-sql-variables-error-in-django-witih-sqlite3

The bulk inserts issue can be resolved by doing them the correct way (that is, using the values argument in execute() rather than the .values() function in Insert).

The solution to the species-lookup issue appears to be making a temporary table.

Antar1011 commented 8 years ago

This build will fail, but it's because this PR has revealed a bug, not because it's introduced one, so I'm merging it, even as I work on the solution.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 99.71% when pulling c7cc22063a3ed76a5a733813737270a0081d9cfe on integration-test into 3827b0e07a5614b2adad613cad496a9e83704280 on master.

Antar1011 commented 8 years ago

To be clear, I don't love that this test is randomly generated. But I did it with the LogProcessor tests as well, so if I'm going to make an issue of it here, I should fix it there too. Maybe I'll make a "tech debt" ticket?

Antar1011 commented 8 years ago

Weirdly, the error I reported in #62 is not the error that gets thrown on Travis. Wonder if the difference is due to different versions of SQLAlchemy..?