Open Elijas opened 5 years ago
maybe not so simple, than it looks (plugin itself need a db_sesion to clean the database) I'll look into it
Oh, I see :/ That would be awesome, thanks!
I really appreciate the plugin though, is there any way I could donate?
Hi,
It's master, please try it before I push a new release.
Just add db_session=False
to decorator.
I don't take donations but you can still ask to @ponyorm authors ;-)
Thanks!
I'merge on master but I'll push release after I've fixed tests
Ok, I got a little confused about the release plan here. Let me know if you need anything!
Just to let you know - based on this SO answer, I realized that in my current project I should have all of my http endpoints under db_session anyway, so I won't manage them individually anymore.
So it's now completely up to you to decide whether this proposal should end up a part of pytest-ponyorm
:)
Hi, just got caught out on this one. Any plans to release the version that supports db_session=False ?
I have tested the master branch version and notice that pytestmark = pytest.mark.pony(db_session=False)
doesn't seem to work
Hi, just got caught out on this one. Any plans to release the version that supports db_session=False ? I have tested the master branch version and notice that
pytestmark = pytest.mark.pony(db_session=False)
doesn't seem to work
From what I understand, this problem arises when you micro-manage session scopes, but you can just cover your code in a @db_session
and you're fine
https://github.com/jgirardet/pytest-ponyorm/issues/5#issuecomment-473571933
master is buggy, I forgot to finish it. why do you want db_session = False @peteretep ?
I think I was micromanaging session scopes as @Elijas mentioned. All my tests were passing but failing in real life with db_session errors. is there some way to test for that in the current released version?
no not yet
I noticed that when developing, I miss @dbsession decorator, since my tests pass, while in actual production not all my code will be automatically covered in session.
This is most relevant for integration tests.
I'd really appreciate having within_session with default True, so I could set it to False, when managing my own tests..