diff options
Diffstat (limited to 'test_six.py')
-rw-r--r-- | test_six.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test_six.py b/test_six.py index e6e75dd..14f0e7e 100644 --- a/test_six.py +++ b/test_six.py @@ -96,7 +96,9 @@ except ImportError: 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+") @@ -183,6 +185,16 @@ def test_import_moves_error_3(): from six.moves.urllib_parse import urljoin +def test_from_six_moves_queue_import_Queue(): + from six.moves.queue import Queue + assert isinstance(Queue, types.ClassType) + + +def test_from_six_moves_configparser_import_ConfigParser(): + from six.moves.configparser import ConfigParser + assert isinstance(ConfigParser, types.ClassType) + + def test_filter(): from six.moves import filter f = filter(lambda x: x % 2, range(10)) |