from .runtime import environment
from .runtime import migration
-__version__ = '1.4.4'
+__version__ = "1.4.4"
sys.modules["alembic.migration"] = migration
sys.modules["alembic.environment"] = environment
def pytest_pycollect_makeitem(collector, name, obj):
if inspect.isclass(obj) and plugin_base.want_class(name, obj):
-
- # in pytest 5.4.0
- # return [
- # pytest.Class.from_parent(collector,
- # name=parametrize_cls.__name__)
- # for parametrize_cls in _parametrize_cls(collector.module, obj)
- # ]
+ ctor = getattr(pytest.Class, "from_parent", pytest.Class)
return [
- pytest.Class(parametrize_cls.__name__, parent=collector)
+ ctor(name=parametrize_cls.__name__, parent=collector)
for parametrize_cls in _parametrize_cls(collector.module, obj)
]
elif (
[testenv]
cov_args=--cov=alembic --cov-report term --cov-report xml
-deps=pytest!=3.9.1,!=3.9.2
+deps=pytest>4.6
pytest-xdist
mock
sqla11: {[tox]SQLA_REPO}@rel_1_1
# only use --dropfirst option if we're *not* using -n;
# if -n is used, we're working in brand new DBs anyway
setenv=
- BASECOMMAND=python -m pytest
+ BASECOMMAND=python -m pytest --rootdir {toxinidir}
WORKERS=-n4
sqla079: WORKERS=--dropfirst
cov: COVERAGE={[testenv]cov_args}