diff options
author | alexanderlukanin13 <alexander.lukanin.13@gmail.com> | 2013-11-07 12:37:58 +0600 |
---|---|---|
committer | alexanderlukanin13 <alexander.lukanin.13@gmail.com> | 2013-11-07 12:37:58 +0600 |
commit | d4ef06a1d8f8ba96d702482979b57a73bca4c578 (patch) | |
tree | 73f68dda13b078500b928c302b035a6b0ba50e71 /test_six.py | |
parent | c2312c1c26a9c68d4c7dad96eba5b39695adbd3f (diff) | |
download | six-d4ef06a1d8f8ba96d702482979b57a73bca4c578.tar.gz |
moves import bug fixed
Diffstat (limited to 'test_six.py')
-rw-r--r-- | test_six.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test_six.py b/test_six.py index efeb33e..ec4d468 100644 --- a/test_six.py +++ b/test_six.py @@ -140,6 +140,26 @@ def test_move_items_urllib_robotparser(item_name): getattr(six.moves.urllib.robotparser, item_name) +def test_import_moves_error_1(): + from six.moves.urllib.parse import urljoin + from six import moves + # In 1.4.1: AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'urljoin' + assert moves.urllib.parse.urljoin + + +def test_import_moves_error_2(): + from six import moves + assert moves.urllib.parse.urljoin + # In 1.4.1: ImportError: cannot import name urljoin + from six.moves.urllib.parse import urljoin + + +def test_import_moves_error_3(): + from six.moves.urllib.parse import urljoin + # In 1.4.1: ImportError: cannot import name urljoin + from six.moves.urllib_parse import urljoin + + def test_filter(): from six.moves import filter f = filter(lambda x: x % 2, range(10)) |