diff options
-rwxr-xr-x | tests/conftest.py | 8 | ||||
-rw-r--r-- | tox.ini | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 325bb45..fc3871f 100755 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,6 +34,14 @@ with open(bootstrap_file) as f: 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 @@ -34,7 +34,7 @@ usedevelop= # 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} |