summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/conftest.py8
-rw-r--r--tox.ini2
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
diff --git a/tox.ini b/tox.ini
index fd1ce31..01c695a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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}