summaryrefslogtreecommitdiff
path: root/test_six.py
diff options
context:
space:
mode:
authoralexanderlukanin13 <alexander.lukanin.13@gmail.com>2013-11-07 12:37:58 +0600
committeralexanderlukanin13 <alexander.lukanin.13@gmail.com>2013-11-07 12:37:58 +0600
commitf2af3efd9f67fc7e2e1053dbeb76739eab65f076 (patch)
tree73f68dda13b078500b928c302b035a6b0ba50e71 /test_six.py
parentcf2bc58847879f84824d8674a02447caa514af44 (diff)
downloadsix-git-f2af3efd9f67fc7e2e1053dbeb76739eab65f076.tar.gz
moves import bug fixed
Diffstat (limited to 'test_six.py')
-rw-r--r--test_six.py20
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))