summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2020-08-30 14:33:08 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2020-08-30 14:33:08 +0000
commit406034d41a764f6fe24374d40c95e79d295f6e80 (patch)
treefbab3150fdcbfb555dc9df0354630fade9cc61a5 /lib/sqlalchemy
parent34dfd7eb88f42e259d3049dbbc823a97b11cb555 (diff)
parent672087176eaf3d0e867c6b5c67bfea3c713be42e (diff)
downloadsqlalchemy-406034d41a764f6fe24374d40c95e79d295f6e80.tar.gz
Merge "internal test framework files for standardization of is_not/not_in;"
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/testing/__init__.py2
-rw-r--r--lib/sqlalchemy/testing/assertions.py12
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/__init__.py b/lib/sqlalchemy/testing/__init__.py
index 45cc7ea2a..c46a3fa89 100644
--- a/lib/sqlalchemy/testing/__init__.py
+++ b/lib/sqlalchemy/testing/__init__.py
@@ -29,10 +29,12 @@ from .assertions import in_ # noqa
from .assertions import is_ # noqa
from .assertions import is_false # noqa
from .assertions import is_instance_of # noqa
+from .assertions import is_not # noqa
from .assertions import is_not_ # noqa
from .assertions import is_true # noqa
from .assertions import le_ # noqa
from .assertions import ne_ # noqa
+from .assertions import not_in # noqa
from .assertions import not_in_ # noqa
from .assertions import startswith_ # noqa
from .assertions import uses_deprecated # noqa
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index 67ef38a25..52a04f9b0 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -236,21 +236,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" % (