mirror of https://github.com/flaggo/pydu.git
merge branch
This commit is contained in:
commit
074042a67f
|
@ -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
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue