Build fails on master branch
tirkarthi opened this issue · 3 comments
tirkarthi commented
I just noticed that the tests fail on the master branch. I did git bisect and it seems some refactoring done in e2e73cb causes statements to be executed on closed connection.
(records-venv) karthi@ubuntu-s-1vcpu-1gb-blr1-01:~/records$ git bisect start HEAD HEAD~10
Bisecting: 12 revisions left to test after this (roughly 4 steps)
[6788aa1c09d772000f30e6dd0d6c0bf1d17b79b0] Merge pull request #143 from vlcinsky/fix_xlsx
(records-venv) karthi@ubuntu-s-1vcpu-1gb-blr1-01:~/records$ git bisect run pytest
[test output removed]
e2e73cbf5dd2eb565da3ea45a8aa6d061bca0a1d is the first bad commit
commit e2e73cbf5dd2eb565da3ea45a8aa6d061bca0a1d
Author: Jan Vlcinsky <jan.vlcinsky@tamtamresearch.com>
Date: Thu Apr 26 22:47:11 2018 +0200
tests/test_transactions.py refactored
:040000 040000 16926d4554127e4f949568822dc4c9239bb18fa4 d9492dc1d510c4d3c805abf678e1e24a5c39a114 M tests
:100644 100644 df57c06184c24c04d981c63f710f0ebe3db08c41 4e93a8b39c407ef3d0d8afe8305f4e570f4738a9 M tox.ini
bisect run success
Thanks
tirkarthi commented
I think this is due to the fact that tests call query at https://github.com/kennethreitz/records/blob/master/records.py#L300 which returns a closed connection object as it returns from the context manager thus causing the subsequent tests to use closed connection object as they yield from the fixture.
Thanks
tirkarthi commented
Thanks, it seems this is a duplicate. Closing.