diff --git a/tests/test_compat.py b/tests/test_compat.py index 7203f12..54f46cc 100644 --- a/tests/test_compat.py +++ b/tests/test_compat.py @@ -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(): @@ -47,8 +48,21 @@ def test_types(): def test_urljoin(): - from pydu.compat import urljoin + assert 'http://uyun.cn/test' == urljoin('http://uyun.cn', 'test') 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 \ No newline at end of file