deb-alembic/run_tests.py
Mike Bayer adc081312e - coverage was not working (and needs to be fixed in SQLAlchemy too),
go back to using a "bootstrap" system where we load in pytestplugin/
noseplugin via file importing, plugin/ is not used as a package.
- identify the pytest_sessionstart hook as the best place to do
plugin_base.post_begin() and actually begin importing main modules;
this is where coverage has actually started.
- we're now targeting 1.0.0 as this has to be ported to SQLAlchemy.
- start using .coveragerc
2014-09-14 15:51:19 -04:00

18 lines
477 B
Python
Executable File

import os
# use bootstrapping so that test plugins are loaded
# without touching the main library before coverage starts
bootstrap_file = os.path.join(
os.path.dirname(__file__), "alembic",
"testing", "plugin", "bootstrap.py"
)
with open(bootstrap_file) as f:
code = compile(f.read(), "bootstrap.py", 'exec')
to_bootstrap = "nose"
exec(code, globals(), locals())
from noseplugin import NoseSQLAlchemy
import nose
nose.main(addplugins=[NoseSQLAlchemy()])