@@ -30,6 +30,17 @@ def test_text_contains_given_search_text(self, search_text, expected_count):
30
30
count = self .g .E ().has ('reason' , Text .text_contains (search_text )).count ().next ()
31
31
assert count == expected_count
32
32
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
+
33
44
@mark .parametrize (
34
45
'search_text,expected_count' ,
35
46
[
@@ -42,6 +53,18 @@ def test_text_contains_prefix_given_search_text(self, search_text, expected_coun
42
53
count = self .g .E ().has ('reason' , Text .text_contains_prefix (search_text )).count ().next ()
43
54
assert count == expected_count
44
55
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
+
45
68
@mark .parametrize (
46
69
'search_text,expected_count' ,
47
70
[
@@ -54,6 +77,18 @@ def test_text_contains_regex_given_search_text(self, search_text, expected_count
54
77
count = self .g .E ().has ('reason' , Text .text_contains_regex (search_text )).count ().next ()
55
78
assert count == expected_count
56
79
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
+
57
92
@mark .parametrize (
58
93
'search_text,expected_count' ,
59
94
[
@@ -65,6 +100,43 @@ def test_text_contains_fuzzy_given_search_text(self, search_text, expected_count
65
100
count = self .g .E ().has ('reason' , Text .text_contains_fuzzy (search_text )).count ().next ()
66
101
assert count == expected_count
67
102
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
+
68
140
@mark .parametrize (
69
141
'search_text,expected_count' ,
70
142
[
@@ -77,6 +149,18 @@ def test_text_prefix_given_search_text(self, search_text, expected_count):
77
149
count = self .g .V ().has ('name' , Text .text_prefix (search_text )).count ().next ()
78
150
assert count == expected_count
79
151
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
+
80
164
@mark .parametrize (
81
165
'search_text,expected_count' ,
82
166
[
@@ -89,6 +173,18 @@ def test_text_regex_given_search_text(self, search_text, expected_count):
89
173
count = self .g .V ().has ('name' , Text .text_regex (search_text )).count ().next ()
90
174
assert count == expected_count
91
175
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
+
92
188
@mark .parametrize (
93
189
'search_text,expected_count' ,
94
190
[
@@ -100,4 +196,15 @@ def test_text_regex_given_search_text(self, search_text, expected_count):
100
196
def test_text_fuzzy_given_search_text (self , search_text , expected_count ):
101
197
count = self .g .V ().has ('name' , Text .text_fuzzy (search_text )).count ().next ()
102
198
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