-
Notifications
You must be signed in to change notification settings - Fork 44
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
postgresql_noproc factory changes dbname to dbname + '_tmpl' #672
Comments
Ho @oev81 it is expected. Same as for the postgres_proc factory:
Although It might be better encapsulated though 🤔 somehow... |
@fizyk
|
@oev81 do I understand correctly, that you're maintaining your test database outside the test code? If that's the case, then the only use of pytest-postgresql fixtures would be to maintain connections. In this case, using raw DatabaseJanitor would be more suitable, like pypi's warehouse is using 🤔 The thing is, that the fixtures main goal is to maintain the databases and the only difference between proc and noproc is that the latter does not manage the database server/process but rely on the developer to provide an instance with running database. And still attempt to create temp database /database pair. And in fact it shouldn't matter that you'll pass the name for the future database to your code unless it'll start before your testing code (and fixtures) 🤔 |
@fizyk Yes, DatabaseJanitor is more suitable. But this class looks like internal, and I thought Its better not to use it. Why? It has the |
@oev81 historically it was used 255681b#diff-47a715ffd93e4dc187da7b1a66fb6f41b7dc05427479c92d61409665dec52dc0 There was the small difference I had to account for between 9.2 and earlier postgresql versions supported at the time. Might be worth to make it optional again, though if that'd be needed again... |
Hi!
Is this expected?
The yielded NoopExecutor instance has initial dbname and it's confusing.
The text was updated successfully, but these errors were encountered: