@@ -30,6 +30,18 @@ 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
+ @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
+
33
45
@mark .parametrize (
34
46
'search_text,expected_count' ,
35
47
[
@@ -42,6 +54,19 @@ def test_text_contains_prefix_given_search_text(self, search_text, expected_coun
42
54
count = self .g .E ().has ('reason' , Text .text_contains_prefix (search_text )).count ().next ()
43
55
assert count == expected_count
44
56
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
+
45
70
@mark .parametrize (
46
71
'search_text,expected_count' ,
47
72
[
@@ -54,6 +79,19 @@ def test_text_contains_regex_given_search_text(self, search_text, expected_count
54
79
count = self .g .E ().has ('reason' , Text .text_contains_regex (search_text )).count ().next ()
55
80
assert count == expected_count
56
81
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
+
57
95
@mark .parametrize (
58
96
'search_text,expected_count' ,
59
97
[
@@ -65,6 +103,46 @@ def test_text_contains_fuzzy_given_search_text(self, search_text, expected_count
65
103
count = self .g .E ().has ('reason' , Text .text_contains_fuzzy (search_text )).count ().next ()
66
104
assert count == expected_count
67
105
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
+
68
146
@mark .parametrize (
69
147
'search_text,expected_count' ,
70
148
[
@@ -77,6 +155,19 @@ def test_text_prefix_given_search_text(self, search_text, expected_count):
77
155
count = self .g .V ().has ('name' , Text .text_prefix (search_text )).count ().next ()
78
156
assert count == expected_count
79
157
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
+
80
171
@mark .parametrize (
81
172
'search_text,expected_count' ,
82
173
[
@@ -89,6 +180,19 @@ def test_text_regex_given_search_text(self, search_text, expected_count):
89
180
count = self .g .V ().has ('name' , Text .text_regex (search_text )).count ().next ()
90
181
assert count == expected_count
91
182
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
+
92
196
@mark .parametrize (
93
197
'search_text,expected_count' ,
94
198
[
@@ -100,4 +204,16 @@ def test_text_regex_given_search_text(self, search_text, expected_count):
100
204
def test_text_fuzzy_given_search_text (self , search_text , expected_count ):
101
205
count = self .g .V ().has ('name' , Text .text_fuzzy (search_text )).count ().next ()
102
206
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