@@ -30,6 +30,18 @@ def test_text_contains_given_search_text(self, search_text, expected_count):
3030 count = self .g .E ().has ('reason' , Text .text_contains (search_text )).count ().next ()
3131 assert count == expected_count
3232
33+ @mark .parametrize (
34+ 'search_text,expected_count' ,
35+ [
36+ param ('loves' , 1 ),
37+ param ('shouldNotBeFound' , 3 ),
38+ ]
39+ )
40+ @mark .minimum_janusgraph_version ("1.1.0" )
41+ def test_text_not_contains_given_search_text (self , search_text , expected_count ):
42+ count = self .g .E ().has ('reason' , Text .text_not_contains (search_text )).count ().next ()
43+ assert count == expected_count
44+
3345 @mark .parametrize (
3446 'search_text,expected_count' ,
3547 [
@@ -42,6 +54,19 @@ def test_text_contains_prefix_given_search_text(self, search_text, expected_coun
4254 count = self .g .E ().has ('reason' , Text .text_contains_prefix (search_text )).count ().next ()
4355 assert count == expected_count
4456
57+ @mark .parametrize (
58+ 'search_text,expected_count' ,
59+ [
60+ param ('wave' , 2 ),
61+ param ('f' , 1 ),
62+ param ('shouldNotBeFound' , 3 ),
63+ ]
64+ )
65+ @mark .minimum_janusgraph_version ("1.1.0" )
66+ def test_text_contains_not_prefix_given_search_text (self , search_text , expected_count ):
67+ count = self .g .E ().has ('reason' , Text .text_not_contains_prefix (search_text )).count ().next ()
68+ assert count == expected_count
69+
4570 @mark .parametrize (
4671 'search_text,expected_count' ,
4772 [
@@ -54,6 +79,19 @@ def test_text_contains_regex_given_search_text(self, search_text, expected_count
5479 count = self .g .E ().has ('reason' , Text .text_contains_regex (search_text )).count ().next ()
5580 assert count == expected_count
5681
82+ @mark .parametrize (
83+ 'search_text,expected_count' ,
84+ [
85+ param ('.*ave.*' , 2 ),
86+ param ('f.{3,4}' , 1 ),
87+ param ('shouldNotBeFound' , 3 ),
88+ ]
89+ )
90+ @mark .minimum_janusgraph_version ("1.1.0" )
91+ def test_text_not_contains_regex_given_search_text (self , search_text , expected_count ):
92+ count = self .g .E ().has ('reason' , Text .text_not_contains_regex (search_text )).count ().next ()
93+ assert count == expected_count
94+
5795 @mark .parametrize (
5896 'search_text,expected_count' ,
5997 [
@@ -65,6 +103,46 @@ def test_text_contains_fuzzy_given_search_text(self, search_text, expected_count
65103 count = self .g .E ().has ('reason' , Text .text_contains_fuzzy (search_text )).count ().next ()
66104 assert count == expected_count
67105
106+ @mark .parametrize (
107+ 'search_text,expected_count' ,
108+ [
109+ param ('waxes' , 2 ),
110+ param ('shouldNotBeFound' , 3 ),
111+ ]
112+ )
113+ @mark .minimum_janusgraph_version ("1.1.0" )
114+ def test_text_not_contains_fuzzy_given_search_text (self , search_text , expected_count ):
115+ count = self .g .E ().has ('reason' , Text .text_not_contains_fuzzy (search_text )).count ().next ()
116+ assert count == expected_count
117+
118+ @mark .parametrize (
119+ 'search_text,expected_count' ,
120+ [
121+ param ('fresh breezes' , 1 ),
122+ param ('no fear' , 1 ),
123+ param ('fear of' , 1 ),
124+ param ('should not be found' , 0 ),
125+ ]
126+ )
127+ @mark .minimum_janusgraph_version ("1.1.0" )
128+ def test_text_contains_phrase_given_search_text (self , search_text , expected_count ):
129+ count = self .g .E ().has ('reason' , Text .text_contains_phrase (search_text )).count ().next ()
130+ assert count == expected_count
131+
132+ @mark .parametrize (
133+ 'search_text,expected_count' ,
134+ [
135+ param ('fresh breezes' , 2 ),
136+ param ('no fear' , 2 ),
137+ param ('fear of' , 2 ),
138+ param ('should not be found' , 3 ),
139+ ]
140+ )
141+ @mark .minimum_janusgraph_version ("1.1.0" )
142+ def test_text_not_contains_phrase_given_search_text (self , search_text , expected_count ):
143+ count = self .g .E ().has ('reason' , Text .text_not_contains_phrase (search_text )).count ().next ()
144+ assert count == expected_count
145+
68146 @mark .parametrize (
69147 'search_text,expected_count' ,
70148 [
@@ -77,6 +155,19 @@ def test_text_prefix_given_search_text(self, search_text, expected_count):
77155 count = self .g .V ().has ('name' , Text .text_prefix (search_text )).count ().next ()
78156 assert count == expected_count
79157
158+ @mark .parametrize (
159+ 'search_text,expected_count' ,
160+ [
161+ param ('herc' , 11 ),
162+ param ('s' , 9 ),
163+ param ('shouldNotBeFound' , 12 ),
164+ ]
165+ )
166+ @mark .minimum_janusgraph_version ("1.1.0" )
167+ def test_text_not_prefix_given_search_text (self , search_text , expected_count ):
168+ count = self .g .V ().has ('name' , Text .text_not_prefix (search_text )).count ().next ()
169+ assert count == expected_count
170+
80171 @mark .parametrize (
81172 'search_text,expected_count' ,
82173 [
@@ -89,6 +180,19 @@ def test_text_regex_given_search_text(self, search_text, expected_count):
89180 count = self .g .V ().has ('name' , Text .text_regex (search_text )).count ().next ()
90181 assert count == expected_count
91182
183+ @mark .parametrize (
184+ 'search_text,expected_count' ,
185+ [
186+ param ('.*rcule.*' , 11 ),
187+ param ('s.{2}' , 10 ),
188+ param ('shouldNotBeFound' , 12 ),
189+ ]
190+ )
191+ @mark .minimum_janusgraph_version ("1.1.0" )
192+ def test_text_not_regex_given_search_text (self , search_text , expected_count ):
193+ count = self .g .V ().has ('name' , Text .text_not_regex (search_text )).count ().next ()
194+ assert count == expected_count
195+
92196 @mark .parametrize (
93197 'search_text,expected_count' ,
94198 [
@@ -100,4 +204,16 @@ def test_text_regex_given_search_text(self, search_text, expected_count):
100204 def test_text_fuzzy_given_search_text (self , search_text , expected_count ):
101205 count = self .g .V ().has ('name' , Text .text_fuzzy (search_text )).count ().next ()
102206 assert count == expected_count
103-
207+
208+ @mark .parametrize (
209+ 'search_text,expected_count' ,
210+ [
211+ param ('herculex' , 11 ),
212+ param ('ska' , 10 ),
213+ param ('shouldNotBeFound' , 12 ),
214+ ]
215+ )
216+ @mark .minimum_janusgraph_version ("1.1.0" )
217+ def test_text_not_fuzzy_given_search_text (self , search_text , expected_count ):
218+ count = self .g .V ().has ('name' , Text .text_not_fuzzy (search_text )).count ().next ()
219+ assert count == expected_count
0 commit comments