summaryrefslogtreecommitdiff
path: root/test_six.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-01-04 16:04:08 -0600
committerBenjamin Peterson <benjamin@python.org>2014-01-04 16:04:08 -0600
commit90c62b04fc0949c658cb5a10fe73780c811ccb66 (patch)
tree64eb502129b9af21f60046f733cbe441dde6b5b6 /test_six.py
parent26badf9246ee84972d79ce0c6cb5eaabbe23bbbd (diff)
parentdfc9b92ad78fecae3aa7fdf4ede47d9ba1cf125a (diff)
downloadsix-git-90c62b04fc0949c658cb5a10fe73780c811ccb66.tar.gz
Merged in alexanderlukanin13/six/urllib_import_weirdness (pull request #22)
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 8815ee1..e6e75dd 100644
--- a/test_six.py
+++ b/test_six.py
@@ -163,6 +163,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))