You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2023/02/21 18:55:15 UTC

[couchdb] 02/04: mango: skip the `$keymapMatch` test for text indexes

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 9cde1815031cf8947d82fe2e83c3d45664b593e1
Author: Gabor Pali <ga...@ibm.com>
AuthorDate: Mon Feb 20 10:56:14 2023 +0100

    mango: skip the `$keymapMatch` test for text indexes
    
    Text indexes do not support the `$keymapMatch` operator thus let
    the test suite know about this limitation to avoid the related
    error.
---
 src/mango/test/03-operator-test.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mango/test/03-operator-test.py b/src/mango/test/03-operator-test.py
index a67ef91f3..ed5eb3847 100644
--- a/src/mango/test/03-operator-test.py
+++ b/src/mango/test/03-operator-test.py
@@ -66,6 +66,10 @@ class OperatorTests:
         docs = self.db.find({"emptybang": {"$allMatch": {"foo": {"$eq": 2}}}})
         self.assertEqual(len(docs), 0)
 
+    @unittest.skipUnless(
+        not mango.has_text_service(),
+        "text indexes do not support the $keyMapMatch operator",
+    )
     def test_keymap_match(self):
         amdocs = [
             {"foo": {"aa": "bar", "bb": "bang"}},