Skip to content

Commit dadbb6f

Browse files
committed
Minor fixes
1 parent 65daeaa commit dadbb6f

File tree

2 files changed

+66
-66
lines changed

2 files changed

+66
-66
lines changed

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ python:
66
- "3.4"
77
- "3.5"
88
- "3.6"
9-
- "3.7"
9+
- "3.7-dev"
1010

1111
# command to run tests
1212
script: python setup.py test

Diff for: tests/verbal_expressions_test.py

+65-65
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ def test_should_match_anything(self):
6363
)
6464

6565
def test_should_match_anything_but_specified_element_when_element_is_not_found(
66-
self
66+
self
6767
):
6868
self.exp = (
6969
self.v.start_of_line().anything_but("X").end_of_line().regex()
7070
)
7171
six.assertRegex(self, "Y Files", self.exp, "Found the X!")
7272

7373
def test_should_not_match_anything_but_specified_element_when_specified_element_is_found(
74-
self
74+
self
7575
):
7676
self.exp = (
7777
self.v.start_of_line().anything_but("X").end_of_line().regex()
@@ -89,20 +89,20 @@ def test_should_not_find_missing_element(self):
8989
def test_should_match_when_maybe_element_is_present(self):
9090
self.exp = (
9191
self.v.start_of_line()
92-
.find("Python2.")
93-
.maybe("7")
94-
.end_of_line()
95-
.regex()
92+
.find("Python2.")
93+
.maybe("7")
94+
.end_of_line()
95+
.regex()
9696
)
9797
six.assertRegex(self, "Python2.7", self.exp, "Version doesn't match!")
9898

9999
def test_should_match_when_maybe_element_is_missing(self):
100100
self.exp = (
101101
self.v.start_of_line()
102-
.find("Python2.")
103-
.maybe("7")
104-
.end_of_line()
105-
.regex()
102+
.find("Python2.")
103+
.maybe("7")
104+
.end_of_line()
105+
.regex()
106106
)
107107
six.assertRegex(self, "Python2.", self.exp, "Version doesn't match!")
108108

@@ -121,33 +121,33 @@ def test_should_not_match_on_any_when_element_is_not_found(self):
121121
def test_should_match_when_line_break_present(self):
122122
self.exp = (
123123
self.v.start_of_line()
124-
.anything()
125-
.line_break()
126-
.anything()
127-
.end_of_line()
128-
.regex()
124+
.anything()
125+
.line_break()
126+
.anything()
127+
.end_of_line()
128+
.regex()
129129
)
130130
six.assertRegex(self, "Marco \n Polo", self.exp, "Give me a break!!")
131131

132132
def test_should_match_when_line_break_and_carriage_return_present(self):
133133
self.exp = (
134134
self.v.start_of_line()
135-
.anything()
136-
.line_break()
137-
.anything()
138-
.end_of_line()
139-
.regex()
135+
.anything()
136+
.line_break()
137+
.anything()
138+
.end_of_line()
139+
.regex()
140140
)
141141
six.assertRegex(self, "Marco \r\n Polo", self.exp, "Give me a break!!")
142142

143143
def test_should_not_match_when_line_break_is_missing(self):
144144
self.exp = (
145145
self.v.start_of_line()
146-
.anything()
147-
.line_break()
148-
.anything()
149-
.end_of_line()
150-
.regex()
146+
.anything()
147+
.line_break()
148+
.anything()
149+
.end_of_line()
150+
.regex()
151151
)
152152
self.assertNotRegexpMatches(
153153
"Marco Polo", self.exp, "There's a break here!"
@@ -184,48 +184,48 @@ def test_not_match_when_two_words_are_present_instead_of_one(self):
184184
def test_should_match_when_or_condition_fulfilled(self):
185185
self.exp = (
186186
self.v.start_of_line()
187-
.anything()
188-
.find("G")
189-
.OR()
190-
.find("h")
191-
.end_of_line()
192-
.regex()
187+
.anything()
188+
.find("G")
189+
.OR()
190+
.find("h")
191+
.end_of_line()
192+
.regex()
193193
)
194194
six.assertRegex(self, "Github", self.exp, "Octocat not found")
195195

196196
def test_should_not_match_when_or_condition_not_fulfilled(self):
197197
self.exp = (
198198
self.v.start_of_line()
199-
.anything()
200-
.find("G")
201-
.OR()
202-
.find("h")
203-
.end_of_line()
204-
.regex()
199+
.anything()
200+
.find("G")
201+
.OR()
202+
.find("h")
203+
.end_of_line()
204+
.regex()
205205
)
206206
self.assertFalse(re.match(self.exp, "Bitbucket"), "Bucket not found")
207207

208208
def test_should_match_on_upper_case_when_lower_case_is_given_and_any_case_is_true(
209-
self
209+
self
210210
):
211211
self.exp = (
212212
self.v.start_of_line()
213-
.find("THOR")
214-
.end_of_line()
215-
.with_any_case(True)
216-
.regex()
213+
.find("THOR")
214+
.end_of_line()
215+
.with_any_case(True)
216+
.regex()
217217
)
218218
six.assertRegex(self, "thor", self.exp, "Upper case Thor, please!")
219219

220220
def test_should_match_multiple_lines(self):
221221
self.exp = (
222222
self.v.start_of_line()
223-
.anything()
224-
.find("Pong")
225-
.anything()
226-
.end_of_line()
227-
.search_one_line(True)
228-
.regex()
223+
.anything()
224+
.find("Pong")
225+
.anything()
226+
.end_of_line()
227+
.search_one_line(True)
228+
.regex()
229229
)
230230
six.assertRegex(
231231
self, "Ping \n Pong \n Ping", self.exp, "Pong didn't answer"
@@ -234,29 +234,29 @@ def test_should_match_multiple_lines(self):
234234
def test_should_match_email_address(self):
235235
self.exp = (
236236
self.v.start_of_line()
237-
.word()
238-
.then("@")
239-
.word()
240-
.then(".")
241-
.word()
242-
.end_of_line()
243-
.regex()
237+
.word()
238+
.then("@")
239+
.word()
240+
.then(".")
241+
.word()
242+
.end_of_line()
243+
.regex()
244244
)
245245
six.assertRegex(self, "[email protected]", self.exp, "Not a valid email")
246246

247247
def test_should_match_url(self):
248248
self.exp = (
249249
self.v.start_of_line()
250-
.then("http")
251-
.maybe("s")
252-
.then("://")
253-
.maybe("www.")
254-
.word()
255-
.then(".")
256-
.word()
257-
.maybe("/")
258-
.end_of_line()
259-
.regex()
250+
.then("http")
251+
.maybe("s")
252+
.then("://")
253+
.maybe("www.")
254+
.word()
255+
.then(".")
256+
.word()
257+
.maybe("/")
258+
.end_of_line()
259+
.regex()
260260
)
261261
six.assertRegex(
262262
self, "https://www.google.com/", self.exp, "Not a valid email"

0 commit comments

Comments
 (0)