diff options
author | Marc Abramowitz <marc@marc-abramowitz.com> | 2013-09-07 10:19:05 -0700 |
---|---|---|
committer | Marc Abramowitz <marc@marc-abramowitz.com> | 2013-09-07 10:19:05 -0700 |
commit | c97fb65a16dca879b9d215cb6ed1ffdc93c8ef20 (patch) | |
tree | f2687423e7458fd5e1899d12e72ba54a88badfaa /test_six.py | |
parent | 49b5fcc7e024c204db4983a213e1bfddbdf0a9d8 (diff) | |
download | six-c97fb65a16dca879b9d215cb6ed1ffdc93c8ef20.tar.gz |
Put six.moves modules in sys.modules so that they're importable (fixes
#19)
Diffstat (limited to 'test_six.py')
-rw-r--r-- | test_six.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test_six.py b/test_six.py index 81d1776..b2ffe84 100644 --- a/test_six.py +++ b/test_six.py @@ -89,7 +89,9 @@ else: def test_move_items(item_name): """Ensure that everything loads correctly.""" try: - getattr(six.moves, item_name) + item = getattr(six.moves, item_name) + if isinstance(item, types.ModuleType): + __import__("six.moves." + item_name) except AttributeError: if item_name == "zip_longest" and sys.version_info < (2, 6): py.test.skip("zip_longest only available on 2.6+") |