mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-30 04:24:38 -04:00
This is a total hack, as the files here are an exact copy of sqlalchemy/testing/plugin/. I can't see much solution here as I'd like "noseplugin" to be available to environments where SQLAlchemy is installed. However, I also need to be able to load "noseplugin" *without* importing SQLAlchemy, else coverage doesn't work when testing SQLAlchemy itself. A solution here would be if there's a way to get coverage to explicitly include packages that are already imported. Perhaps like a module reload. Other solutions that have not worked include: * set an extra, fake sys.path for "sqlalchemy/testing/plugins" and import relative to that. Breaks in Python 3 as the modules in "sqlalchemy/testing" get interpreted as Python builtins (i.e. warnings), and apparently ConfigParser has "import warnings" and it all breaks. * Have the noseplugin install as an entirely separate package next to lib/. We did this in 0.6 and users complained, as we also had it enabled as a nose plugin. just having it there as a "do-nothing", separately installed package, is really awkward. Doesn't work. so: TODO 1. fix that pdb you have stuck in _do_skips 2. offload everything in noseplugin that is post-coverage out to testing/ - mainly _do_skips and the before/after test/context hooks. 3. merge plugins/config into noseplugin. 4. remove test/plugin 5. have sqla_nose.py load noseplugin.py as a single .py file, using imp or similar. it has no dependencies outside of sqlalchemy.testing.