merge branch

This commit is contained in:
agnewee 2017-12-05 23:57:57 +08:00
commit 074042a67f
2 changed files with 19 additions and 2 deletions

View File

@ -1,6 +1,7 @@
from pydu.compat import (PY2, iterkeys, itervalues, iteritems,
text_type, string_types, numeric_types,
is_iterable, has_next_attr)
is_iterable, has_next_attr, urljoin,
imap)
def test_itersth():
@ -51,4 +52,17 @@ def test_urlmisc():
def test_imap():
from pydu.compat import imap
assert list(imap(pow, (2, 3, 10), (5, 2, 3))) == [32, 9, 1000]
assert list(imap(max, (1, 4, 7), (2, 3, 8))) == [2, 4, 8]
# TODO: add test case
def test_ulib():
from pydu.compat import ulib
pass
# TODO: add test case
def test_urlparse():
from pydu.compat import urlparse
pass

View File

@ -14,6 +14,9 @@ def test_safeunicode():
assert safeunicode(1) == u'1'
assert safeunicode('中文') == u'中文'
assert safeunicode(u'hello') == u'hello'
assert safeunicode(u'中文') == u'中文'
def test_lstrips():
assert lstrips('foobbar', '') == 'foobbar'