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
open-source
logilab-mtconverter
Commits
bf4de921620e
Commit
1f45b39f
authored
Aug 02, 2014
by
Rémi Cardona
Browse files
[py3k] Import unquote from six.moves
Related to #268148.
parent
45e2f83f4daa
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/unittest_engine.py
View file @
bf4de921
...
...
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License along
# with logilab-mtconverter. If not, see <http://www.gnu.org/licenses/>.
from
logilab.common.testlib
import
TestCase
,
unittest_main
import
urllib
from
six.moves.urllib.parse
import
unquote
as
url_unquote
import
re
import
os.path
as
osp
...
...
@@ -33,7 +33,7 @@ class HtmlToText(Transform):
def
__call__
(
self
,
orig
):
orig
=
re
.
sub
(
'<[^>]*>(?i)(?m)'
,
''
,
orig
)
return
url
lib
.
unquote
(
re
.
sub
(
'
\n
+'
,
'
\n
'
,
orig
)).
strip
()
return
url
_
unquote
(
re
.
sub
(
'
\n
+'
,
'
\n
'
,
orig
)).
strip
()
def
_convert
(
self
,
data
):
return
self
.
__call__
(
data
.
data
)
...
...
@@ -47,7 +47,7 @@ class FooToBar(Transform):
def
__call__
(
self
,
orig
):
orig
=
re
.
sub
(
'foo'
,
'bar'
,
orig
)
return
url
lib
.
unquote
(
re
.
sub
(
'
\n
+'
,
'
\n
'
,
orig
)).
strip
()
return
url
_
unquote
(
re
.
sub
(
'
\n
+'
,
'
\n
'
,
orig
)).
strip
()
def
_convert
(
self
,
data
):
return
self
.
__call__
(
data
.
data
)
...
...
Write
Preview
Supports
Markdown
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