JamesHutchison / pytest-hot-reloading

A hot reloading pytest daemon, implemented as a plugin
MIT License
86 stars 2 forks source link

Add SQLAlchemy clean-up workaround #82

Closed JamesHutchison closed 7 months ago

JamesHutchison commented 7 months ago

This adds a clean-up function for sqlalchemy that seems prudent. That said, I cannot vouch for its value, as I added this while debugging some issues with sessions being reused in async tests. I was still seeing sqlalchemy complaining about deleting sessions that weren't closed, so its not clear to me, yet, what is happening there.

I don't think there is any harm in having this.

JamesHutchison commented 7 months ago

A quick test reveals that this may be a performance penalty, so maybe there's a better way to go about this.