summaryrefslogtreecommitdiff
path: root/test/sql/test_operators.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-09-22 16:45:02 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-09-22 16:45:02 -0400
commit6c50ffcf44b8e363a5d3590955be1f62fd5e780d (patch)
tree46b3c82f39577dae3ff33ba8e415e0ae50b9da8e /test/sql/test_operators.py
parent1ceda8c23c277fd68bc159962f276d20cfa7bbf1 (diff)
downloadsqlalchemy-6c50ffcf44b8e363a5d3590955be1f62fd5e780d.tar.gz
- aaand actually get is/isnot to be usable with None/NULL
Diffstat (limited to 'test/sql/test_operators.py')
-rw-r--r--test/sql/test_operators.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/sql/test_operators.py b/test/sql/test_operators.py
index a6c99be43..951309d19 100644
--- a/test/sql/test_operators.py
+++ b/test/sql/test_operators.py
@@ -20,9 +20,8 @@ class DefaultColumnComparatorTest(fixtures.TestBase):
compare_to(left)
)
- def _do_operate_test(self, operator):
+ def _do_operate_test(self, operator, right=column('right')):
left = column('left')
- right = column('right')
assert left.comparator.operate(operator, right).compare(
BinaryExpression(left, right, operator)
@@ -41,6 +40,12 @@ class DefaultColumnComparatorTest(fixtures.TestBase):
def test_plus(self):
self._do_operate_test(operators.add)
+ def test_is_null(self):
+ self._do_operate_test(operators.is_, None)
+
+ def test_isnot_null(self):
+ self._do_operate_test(operators.isnot, None)
+
def test_is(self):
self._do_operate_test(operators.is_)