Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
jsonschema
Commits
1adc34b087aa
Commit
df021ad3
authored
Jan 23, 2020
by
Guillaume Vandevelde
Browse files
[doctestutils] Fix some flake8 errors on escape sequence
--HG-- branch : 0.1
parent
2f8229c68e19
Changes
1
Hide whitespace changes
Inline
Side-by-side
cubicweb_jsonschema/doctestutils.py
View file @
1adc34b0
...
...
@@ -52,10 +52,10 @@ def _parse_webtest_testresponse(string):
break
else
:
raise
ParseError
(
'not a webtest.TestResponse string'
)
if
not
re
.
match
(
'Response: \d{3} \w+'
,
status
):
if
not
re
.
match
(
r
'Response: \d{3} \w+'
,
status
):
raise
ParseError
(
'not a webtest.TestResponse string'
)
headers
=
[]
while
re
.
match
(
'[a-zA-Z\-]+: [^
\n
]+
\n
'
,
rest
):
while
re
.
match
(
r
'[a-zA-Z\-]+: [^\n]+\n'
,
rest
):
header
,
rest
=
rest
.
split
(
'
\n
'
,
1
)
name
,
value
=
header
.
split
(
':'
,
1
)
headers
.
append
((
name
.
strip
(),
value
.
strip
()))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment