-
Notifications
You must be signed in to change notification settings - Fork 45
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
Disable session.remove on flask_sqlalchemy.SQLAlchemy #18
Comments
Sorry it took me so long to get to this @Teyras! That seems like a pretty nasty race condition. I'd welcome a PR making this change if you've had some success with it. We'll have to be careful to preserve the pytest-flask-sqlalchemy/pytest_flask_sqlalchemy/fixtures.py Lines 75 to 78 in 7cb57c0
But we should probably be able to get away with preserving the method the same way we do pytest-flask-sqlalchemy/pytest_flask_sqlalchemy/fixtures.py Lines 130 to 133 in 7cb57c0
|
This adds a quick workaround for the issues with the inventory tests that we've been running into. This should be reverted once this issues is fixed: jeancochrane/pytest-flask-sqlalchemy#18 Signed-off-by: M. David Bennett <[email protected]>
This adds a quick workaround for the issues with the inventory tests that we've been running into. This should be reverted once this issues is fixed: jeancochrane/pytest-flask-sqlalchemy#18 Signed-off-by: M. David Bennett <[email protected]>
With Flask-SQLAlchemy 2.4.0, SQLAlchemy 1.3.3 and pytest-flask-sqlalchemy 1.0.2, I sometimes (non-deterministically) got
DetachedInstanceError
because the session instantiated in theflask_sqlalchemy.SQLAlchemy
extension already terminated the session (https://github.com/pallets/flask-sqlalchemy/blob/master/flask_sqlalchemy/__init__.py#L849).Adding something like this to
conftest.py
helped.The text was updated successfully, but these errors were encountered: