Repository: couchdb-mango Updated Branches: refs/heads/tonysun83-start-end-key-issue 3611aadb2 -> b3032dc23
Add testcase for empty range Fixes COUCHDB-2614 Project: http://git-wip-us.apache.org/repos/asf/couchdb-mango/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mango/commit/b3032dc2 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mango/tree/b3032dc2 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mango/diff/b3032dc2 Branch: refs/heads/tonysun83-start-end-key-issue Commit: b3032dc23cfed46df4fab2f36e9b8412f2711856 Parents: 3611aad Author: Tony Sun <[email protected]> Authored: Tue Feb 24 12:05:09 2015 -0800 Committer: Tony Sun <[email protected]> Committed: Tue Feb 24 12:05:09 2015 -0800 ---------------------------------------------------------------------- test/02-basic-find-test.py | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/b3032dc2/test/02-basic-find-test.py ---------------------------------------------------------------------- diff --git a/test/02-basic-find-test.py b/test/02-basic-find-test.py index 8113b21..37459a2 100644 --- a/test/02-basic-find-test.py +++ b/test/02-basic-find-test.py @@ -258,3 +258,12 @@ class BasicFindTests(mango.UserDocsTests): }) assert len(docs) == 1 assert docs[0]["user_id"] == "eo" + + def test_unsatisfiable_range(self): + docs = self.db.find({ + "$and":[ + {"age":{"$gt": 0}}, + {"age":{"$lt": 0}} + ] + }) + assert len(docs) == 0
