summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/exclusions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-09-08 11:47:39 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2016-09-08 11:47:39 -0400
commitc63fe0d4495b0fc554a085a314e837d5404231d3 (patch)
tree9f36f8b3fdcbdd96e8acf937ce38c0ff7f739f06 /lib/sqlalchemy/testing/exclusions.py
parentecc98fd8e42632179f47c972dc1dac6e9170adcb (diff)
downloadsqlalchemy-pool_additions.tar.gz
- allow for the exclusions system and SuiteRequirements to bepool_additions
usable without the full plugin_base setup. - move some Python-env requirements to the importable requirements.py module. Change-Id: I3bfffce75b53040f6923b89e0fa2140bec243bc8
Diffstat (limited to 'lib/sqlalchemy/testing/exclusions.py')
-rw-r--r--lib/sqlalchemy/testing/exclusions.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/sqlalchemy/testing/exclusions.py b/lib/sqlalchemy/testing/exclusions.py
index b672656a0..fb1041db3 100644
--- a/lib/sqlalchemy/testing/exclusions.py
+++ b/lib/sqlalchemy/testing/exclusions.py
@@ -109,21 +109,21 @@ class compound(object):
else:
all_fails._expect_success(config._current)
- def _do(self, config, fn, *args, **kw):
+ def _do(self, cfg, fn, *args, **kw):
for skip in self.skips:
- if skip(config):
+ if skip(cfg):
msg = "'%s' : %s" % (
fn.__name__,
- skip._as_string(config)
+ skip._as_string(cfg)
)
config.skip_test(msg)
try:
return_value = fn(*args, **kw)
except Exception as ex:
- self._expect_failure(config, ex, name=fn.__name__)
+ self._expect_failure(cfg, ex, name=fn.__name__)
else:
- self._expect_success(config, name=fn.__name__)
+ self._expect_success(cfg, name=fn.__name__)
return return_value
def _expect_failure(self, config, ex, name='block'):
@@ -208,8 +208,10 @@ class Predicate(object):
if negate:
bool_ = not negate
return self.description % {
- "driver": config.db.url.get_driver_name(),
- "database": config.db.url.get_backend_name(),
+ "driver": config.db.url.get_driver_name()
+ if config else "<no driver>",
+ "database": config.db.url.get_backend_name()
+ if config else "<no database>",
"doesnt_support": "doesn't support" if bool_ else "does support",
"does_support": "does support" if bool_ else "doesn't support"
}