@@ -30,6 +30,17 @@ 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+ def test_text_not_contains_given_search_text (self , search_text , expected_count ):
41+ count = self .g .E ().has ('reason' , Text .text_not_contains (search_text )).count ().next ()
42+ assert count == expected_count
43+
3344 @mark .parametrize (
3445 'search_text,expected_count' ,
3546 [
@@ -42,6 +53,18 @@ def test_text_contains_prefix_given_search_text(self, search_text, expected_coun
4253 count = self .g .E ().has ('reason' , Text .text_contains_prefix (search_text )).count ().next ()
4354 assert count == expected_count
4455
56+ @mark .parametrize (
57+ 'search_text,expected_count' ,
58+ [
59+ param ('wave' , 2 ),
60+ param ('f' , 1 ),
61+ param ('shouldNotBeFound' , 3 ),
62+ ]
63+ )
64+ def test_text_contains_not_prefix_given_search_text (self , search_text , expected_count ):
65+ count = self .g .E ().has ('reason' , Text .text_not_contains_prefix (search_text )).count ().next ()
66+ assert count == expected_count
67+
4568 @mark .parametrize (
4669 'search_text,expected_count' ,
4770 [
@@ -54,6 +77,18 @@ def test_text_contains_regex_given_search_text(self, search_text, expected_count
5477 count = self .g .E ().has ('reason' , Text .text_contains_regex (search_text )).count ().next ()
5578 assert count == expected_count
5679
80+ @mark .parametrize (
81+ 'search_text,expected_count' ,
82+ [
83+ param ('.*ave.*' , 2 ),
84+ param ('f.{3,4}' , 1 ),
85+ param ('shouldNotBeFound' , 3 ),
86+ ]
87+ )
88+ def test_text_not_contains_regex_given_search_text (self , search_text , expected_count ):
89+ count = self .g .E ().has ('reason' , Text .text_not_contains_regex (search_text )).count ().next ()
90+ assert count == expected_count
91+
5792 @mark .parametrize (
5893 'search_text,expected_count' ,
5994 [
@@ -65,6 +100,43 @@ def test_text_contains_fuzzy_given_search_text(self, search_text, expected_count
65100 count = self .g .E ().has ('reason' , Text .text_contains_fuzzy (search_text )).count ().next ()
66101 assert count == expected_count
67102
103+ @mark .parametrize (
104+ 'search_text,expected_count' ,
105+ [
106+ param ('waxes' , 2 ),
107+ param ('shouldNotBeFound' , 3 ),
108+ ]
109+ )
110+ def test_text_not_contains_fuzzy_given_search_text (self , search_text , expected_count ):
111+ count = self .g .E ().has ('reason' , Text .text_not_contains_fuzzy (search_text )).count ().next ()
112+ assert count == expected_count
113+
114+ @mark .parametrize (
115+ 'search_text,expected_count' ,
116+ [
117+ param ('fresh breezes' , 1 ),
118+ param ('no fear' , 1 ),
119+ param ('fear of' , 1 ),
120+ param ('should not be found' , 0 ),
121+ ]
122+ )
123+ def test_text_contains_phrase_given_search_text (self , search_text , expected_count ):
124+ count = self .g .E ().has ('reason' , Text .text_contains_phrase (search_text )).count ().next ()
125+ assert count == expected_count
126+
127+ @mark .parametrize (
128+ 'search_text,expected_count' ,
129+ [
130+ param ('fresh breezes' , 2 ),
131+ param ('no fear' , 2 ),
132+ param ('fear of' , 2 ),
133+ param ('should not be found' , 3 ),
134+ ]
135+ )
136+ def test_text_not_contains_phrase_given_search_text (self , search_text , expected_count ):
137+ count = self .g .E ().has ('reason' , Text .text_not_contains_phrase (search_text )).count ().next ()
138+ assert count == expected_count
139+
68140 @mark .parametrize (
69141 'search_text,expected_count' ,
70142 [
@@ -77,6 +149,18 @@ def test_text_prefix_given_search_text(self, search_text, expected_count):
77149 count = self .g .V ().has ('name' , Text .text_prefix (search_text )).count ().next ()
78150 assert count == expected_count
79151
152+ @mark .parametrize (
153+ 'search_text,expected_count' ,
154+ [
155+ param ('herc' , 11 ),
156+ param ('s' , 9 ),
157+ param ('shouldNotBeFound' , 12 ),
158+ ]
159+ )
160+ def test_text_not_prefix_given_search_text (self , search_text , expected_count ):
161+ count = self .g .V ().has ('name' , Text .text_not_prefix (search_text )).count ().next ()
162+ assert count == expected_count
163+
80164 @mark .parametrize (
81165 'search_text,expected_count' ,
82166 [
@@ -89,6 +173,18 @@ def test_text_regex_given_search_text(self, search_text, expected_count):
89173 count = self .g .V ().has ('name' , Text .text_regex (search_text )).count ().next ()
90174 assert count == expected_count
91175
176+ @mark .parametrize (
177+ 'search_text,expected_count' ,
178+ [
179+ param ('.*rcule.*' , 11 ),
180+ param ('s.{2}' , 10 ),
181+ param ('shouldNotBeFound' , 12 ),
182+ ]
183+ )
184+ def test_text_not_regex_given_search_text (self , search_text , expected_count ):
185+ count = self .g .V ().has ('name' , Text .text_not_regex (search_text )).count ().next ()
186+ assert count == expected_count
187+
92188 @mark .parametrize (
93189 'search_text,expected_count' ,
94190 [
@@ -100,4 +196,15 @@ def test_text_regex_given_search_text(self, search_text, expected_count):
100196 def test_text_fuzzy_given_search_text (self , search_text , expected_count ):
101197 count = self .g .V ().has ('name' , Text .text_fuzzy (search_text )).count ().next ()
102198 assert count == expected_count
103-
199+
200+ @mark .parametrize (
201+ 'search_text,expected_count' ,
202+ [
203+ param ('herculex' , 11 ),
204+ param ('ska' , 10 ),
205+ param ('shouldNotBeFound' , 12 ),
206+ ]
207+ )
208+ def test_text_not_fuzzy_given_search_text (self , search_text , expected_count ):
209+ count = self .g .V ().has ('name' , Text .text_not_fuzzy (search_text )).count ().next ()
210+ assert count == expected_count
0 commit comments