We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In https://github.com/CloverHealth/pytest-pgsql/blob/15c99b8ad65a2746970f148c7efb7a9cc8caabcf/docs/index.rst#manipulating-time it has:
with postgresql.time.freeze('December 31st 1999 11:59:59 PM') as freezer: # Time is frozen inside the database *and* Python. …
That should probably be with pytest_pgsql.freeze_time.
with pytest_pgsql.freeze_time
It's also in the docs.
Happy to do a PR, but wasn't sure if that was meant really. (the example code then also should have an import probably to make things clearer)
The text was updated successfully, but these errors were encountered:
Oops! Yes, please feel free to open a PR with the correction.
@vskr's solution is correct. @blueyed if you could open a PR to change that to postgresql_db instead of postgresql that'd be awesome.
postgresql_db
postgresql
Sorry, something went wrong.
pytest_pgsql.freeze_time is not a context manager. Can we use with pytest_pgsql.freeze_time
pytest_pgsql.freeze_time
How can we advance(tick or set advance time) using pytest_pgsql.freeze_time. Thanks!
I think postgresql_db or transacted_postgresl_db can be used as context managers. This is how I got it to work for anyone interested in the future:
with transacted_postgresql_db.time.freeze('December 31st 1999 11:59:59 PM') as freezer: freezer.tick()
No branches or pull requests
In https://github.com/CloverHealth/pytest-pgsql/blob/15c99b8ad65a2746970f148c7efb7a9cc8caabcf/docs/index.rst#manipulating-time it has:
That should probably be
with pytest_pgsql.freeze_time
.It's also in the docs.
Happy to do a PR, but wasn't sure if that was meant really.
(the example code then also should have an import probably to make things clearer)
The text was updated successfully, but these errors were encountered: