#32403: When run test with off postgres database got `RuntimeError: generator
didn't yield` instead of connection error
--------------------------------------------+-----------------------------
Reporter: Kazantcev Andrey | Owner: (none)
Type: Bug | Status: new
Component: contrib.postgres | Version: 3.2
Severity: Normal | Keywords: postgres db
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+-----------------------------
I have only default database configuration and if I run tests without
started postgresql I got
{{{
File "C:\Users\Asus\.virtualenvs\curds-cxXQlVO3\lib\site-
packages\django\test\runner.py", line 695, in run_tests
old_config = self.setup_databases(aliases=databases)
File "C:\Users\Asus\.virtualenvs\curds-cxXQlVO3\lib\site-
packages\django\test\runner.py", line 614, in setup_databases
return _setup_databases(
File "C:\Users\Asus\.virtualenvs\curds-cxXQlVO3\lib\site-
packages\django\test\utils.py", line 170, in setup_databases
connection.creation.create_test_db(
File "C:\Users\Asus\.virtualenvs\curds-cxXQlVO3\lib\site-
packages\django\db\backends\base\creation.py", line 55, in create_test_db
self._create_test_db(verbosity, autoclobber, keepdb)
File "C:\Users\Asus\.virtualenvs\curds-cxXQlVO3\lib\site-
packages\django\db\backends\base\creation.py", line 186, in
_create_test_db
with self._nodb_cursor() as cursor:
File "c:\python39\lib\contextlib.py", line 119, in __enter__
raise RuntimeError("generator didn't yield") from None
RuntimeError: generator didn't yield
}}}
Seams `_nodb_cursor` method didn't do yield when handling error.
--
Ticket URL: <https://code.djangoproject.com/ticket/32403>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/049.e243514d12fe5a644d3531cf617dafc6%40djangoproject.com.