summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/assertions.py
diff options
context:
space:
mode:
authorjonathan vanasco <jonathan@2xlp.com>2015-07-10 18:52:46 -0400
committerjonathan vanasco <jonathan@2xlp.com>2015-07-10 18:52:46 -0400
commit0a5dcdc2c4112478d87e5cd68c187e302f586834 (patch)
treedfdb29e7668d4a007bd243805fd38cbccd971ad1 /lib/sqlalchemy/testing/assertions.py
parent6de3d490a2adb0fff43f98e15a53407b46668b61 (diff)
parentcadc2e0ba00feadf7e860598030bda0fb8bc691c (diff)
downloadsqlalchemy-0a5dcdc2c4112478d87e5cd68c187e302f586834.tar.gz
Merge branch 'master' of bitbucket.org:zzzeek/sqlalchemy
Diffstat (limited to 'lib/sqlalchemy/testing/assertions.py')
-rw-r--r--lib/sqlalchemy/testing/assertions.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index e5249c296..01fa0b8a9 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -50,8 +50,6 @@ def expect_warnings_on(db, *messages, **kw):
if isinstance(db, util.string_types) and not spec(config._current):
yield
- elif not _is_excluded(*db):
- yield
else:
with expect_warnings(*messages, **kw):
yield
@@ -90,7 +88,7 @@ def emits_warning_on(db, *messages):
"""
@decorator
def decorate(fn, *args, **kw):
- with expect_warnings_on(db, *messages):
+ with expect_warnings_on(db, assert_=False, *messages):
return fn(*args, **kw)
return decorate
@@ -216,6 +214,11 @@ def ne_(a, b, msg=None):
assert a != b, msg or "%r == %r" % (a, b)
+def le_(a, b, msg=None):
+ """Assert a <= b, with repr messaging on failure."""
+ assert a <= b, msg or "%r != %r" % (a, b)
+
+
def is_(a, b, msg=None):
"""Assert a is b, with repr messaging on failure."""
assert a is b, msg or "%r is not %r" % (a, b)