-
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
Postgres error "SAVEPOINT can only be used in transaction blocks" when used with live_server #17
Comments
This is a pretty interesting problem. I don't have much experience with
This makes me wonder whether Another interesting lead is that I can't actually replicate the error you're seeing. Instead, I see an error that gets raised when the
This SO thread seems to see a similar error in a multiprocessing context. Sorry if that isn't a very helpful answer at this stage. I should have some more time next week to dig into this more deeply if you're still having problems. |
@jeancochrane Thanks for such detailed explanation, and any help is appreciated! That is strange, that error is different. I used pipenv, so all exact versions should be presented in Pipenv.lock I run Postgresl on docker, maybe I should build docker-compose environment, so it will be easier to reproduce. |
A Docker environment would be really helpful!
…On Mon, Apr 22, 2019 at 3:19 PM Nikolai Golub ***@***.***> wrote:
@jeancochrane <https://github.com/jeancochrane> Thanks for such detailed
explanation, and any help is appreciated!
That is strange, that error is different. I used pipenv, so all exact
versions should be presented in Pipenv.lock I run Postgresl on docker,
maybe I should build docker-compose environment, so it will be easier to
reproduce.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADMDUGSW7JXNRWBWQPIKCL3PRYFSTANCNFSM4HGCOUPQ>
.
|
I'm trialling out this plugin to see if I can get tests isolated in transactions in a repo I work with. After a few hours of fiddling with the main unit tests, and getting them all passing, I'm now onto the functional tests using the live_server. I'm getting the same error as OP. :( |
@jeancochrane , I've finally managed to create docker environment, repository is updated: just use |
Awesome, thanks @citizen-stig! I'll have time to do some testing this weekend. |
any upadtes on this im facing a similar issue? |
I have tests, that I would like to run with live_server from pytest-flask package.
I thought it works ok, but only for single request. Full repo with working example, failing test
Here are some pieces of the code:
factories from conftest.py
Test itself:
I'm getting error on line
assert models.Category.query.count() == 5
, or if I comment it out,data_2
data returned by the server is empty.The error:
Full stack trace
Could you please help me, I don't know where to start to investigate this.
The text was updated successfully, but these errors were encountered: