summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/assertions.py
diff options
context:
space:
mode:
authorjonathan vanasco <jonathan@2xlp.com>2020-08-24 18:53:31 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-08-29 12:05:58 -0400
commit672087176eaf3d0e867c6b5c67bfea3c713be42e (patch)
tree659bc160dd94230c6fc94189617f414122de241d /lib/sqlalchemy/testing/assertions.py
parent317f2e1be2b06cdc12bc84510eb743d9752763dd (diff)
downloadsqlalchemy-672087176eaf3d0e867c6b5c67bfea3c713be42e.tar.gz
internal test framework files for standardization of is_not/not_in;
this is safe for 1.3.x Change-Id: Icba38fdc20f5d8ac407383a4278ccb346e09af38
Diffstat (limited to 'lib/sqlalchemy/testing/assertions.py')
-rw-r--r--lib/sqlalchemy/testing/assertions.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index f9fabbeed..4a4188cf6 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -234,21 +234,29 @@ def is_(a, b, msg=None):
assert a is b, msg or "%r is not %r" % (a, b)
-def is_not_(a, b, msg=None):
+def is_not(a, b, msg=None):
"""Assert a is not b, with repr messaging on failure."""
assert a is not b, msg or "%r is %r" % (a, b)
+# deprecated. See #5429
+is_not_ = is_not
+
+
def in_(a, b, msg=None):
"""Assert a in b, with repr messaging on failure."""
assert a in b, msg or "%r not in %r" % (a, b)
-def not_in_(a, b, msg=None):
+def not_in(a, b, msg=None):
"""Assert a in not b, with repr messaging on failure."""
assert a not in b, msg or "%r is in %r" % (a, b)
+# deprecated. See #5429
+not_in_ = not_in
+
+
def startswith_(a, fragment, msg=None):
"""Assert a.startswith(fragment), with repr messaging on failure."""
assert a.startswith(fragment), msg or "%r does not start with %r" % (