Need to disable asyncio before calling into pytest session start or windows will fails randomly.
Closes: #783
Pull-request: https://github.com/sqlalchemy/alembic/pull/783
Pull-request-sha:
c92f7a2c0460899c942fcc668cbffe672b59df01
Change-Id: I9026334db651aa977fbc809494f449e38ca16a6f
code = compile(f.read(), "bootstrap.py", "exec")
to_bootstrap = "pytest"
exec(code, globals(), locals())
+
+ try:
+ from sqlalchemy.testing import asyncio
+ except ImportError:
+ pass
+ else:
+ asyncio.ENABLE_ASYNCIO = False
+
from sqlalchemy.testing.plugin.pytestplugin import * # noqa
wrap_pytest_sessionstart = pytest_sessionstart # noqa
# if -n is used, we're working in brand new DBs anyway
setenv=
BASECOMMAND=python -m pytest --rootdir {toxinidir}
- WORKERS=-n4
+ WORKERS={env:TOX_WORKERS:-n4}
sqla079: WORKERS=--dropfirst
cov: COVERAGE={[testenv]cov_args}
sqlite: SQLITE={env:TOX_SQLITE:--db sqlite}