diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-05-01 13:15:51 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-05-01 13:15:51 -0400 |
commit | 2ef1c56436d25e8a710a8679c59400c0e4009cd6 (patch) | |
tree | 0a68433ec8225880afb4802d19579e6c6ef9324a /lib/sqlalchemy/testing/plugin/pytestplugin.py | |
parent | 95949db715ff54be01bfd260a51903ede60597ae (diff) | |
download | sqlalchemy-2ef1c56436d25e8a710a8679c59400c0e4009cd6.tar.gz |
- move away from explicit raises of SkipTest, instead call a
function patched onto config. nose/pytest backends now fill
in their exception class here only when loaded
- use more public seeming api to get at py.test Skipped
exception
Diffstat (limited to 'lib/sqlalchemy/testing/plugin/pytestplugin.py')
-rw-r--r-- | lib/sqlalchemy/testing/plugin/pytestplugin.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py index fbab4966c..30d7aa73a 100644 --- a/lib/sqlalchemy/testing/plugin/pytestplugin.py +++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py @@ -12,7 +12,7 @@ import collections import itertools try: - import xdist + import xdist # noqa has_xdist = True except ImportError: has_xdist = False @@ -48,6 +48,8 @@ def pytest_configure(config): plugin_base.set_coverage_flag(bool(getattr(config.option, "cov_source", False))) + plugin_base.set_skip_test(pytest.skip.Exception) + def pytest_sessionstart(session): plugin_base.post_begin() @@ -127,6 +129,7 @@ def pytest_pycollect_makeitem(collector, name, obj): _current_class = None + def pytest_runtest_setup(item): # here we seem to get called only based on what we collected # in pytest_collection_modifyitems. So to do class-based stuff |