diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-01-22 13:19:22 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-01-22 13:19:22 -0500 |
commit | c9a1e570ad68028e0de0551155caeae313c9c7fd (patch) | |
tree | 93b194dd8c99481f1c8f3b354eab3d6eda6d0ac2 /test/lib/testing.py | |
parent | 959d7cbe33ee2e39e2a43b6e7a9c1a750664d569 (diff) | |
download | sqlalchemy-c9a1e570ad68028e0de0551155caeae313c9c7fd.tar.gz |
- rework the test suite to make use of SkipTest for tests skipped, unsupported, etc.
so that we can get an accurate picture what's really running/not, what's installed on jenkins, etc.
Tested in cpython 2.7 so far, we'll see what jenkins says about other platforms
Diffstat (limited to 'test/lib/testing.py')
-rw-r--r-- | test/lib/testing.py | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/test/lib/testing.py b/test/lib/testing.py index 53a277b9d..1d00d04d8 100644 --- a/test/lib/testing.py +++ b/test/lib/testing.py @@ -188,10 +188,7 @@ def _block_unconditionally(db, reason): if spec(config.db): msg = "'%s' unsupported on DB implementation '%s+%s': %s" % ( fn.__name__, config.db.name, config.db.driver, reason) - print msg - if carp: - print >> sys.stderr, msg - return True + raise SkipTest(msg) else: return fn(*args, **kw) return decorate @@ -206,10 +203,7 @@ def only_on(dbs, reason): else: msg = "'%s' unsupported on DB implementation '%s+%s': %s" % ( fn.__name__, config.db.name, config.db.driver, reason) - print msg - if carp: - print >> sys.stderr, msg - return True + raise SkipTest(msg) return decorate def exclude(db, op, spec, reason): @@ -231,10 +225,7 @@ def exclude(db, op, spec, reason): if _is_excluded(db, op, spec): msg = "'%s' unsupported on DB %s version '%s': %s" % ( fn.__name__, config.db.name, _server_version(), reason) - print msg - if carp: - print >> sys.stderr, msg - return True + raise SkipTest(msg) else: return fn(*args, **kw) return decorate @@ -300,10 +291,7 @@ def skip_if(predicate, reason=None): if predicate(): msg = "'%s' skipped on DB %s version '%s': %s" % ( fn.__name__, config.db.name, _server_version(), reason) - print msg - if carp: - print >> sys.stderr, msg - return True + raise SkipTest(msg) else: return fn(*args, **kw) return decorate |