diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-03-13 22:37:55 -0500 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-03-13 22:37:55 -0500 |
commit | 911ac1a49e417e0bcb0a71df583d92dd4f894db6 (patch) | |
tree | f91e33507ef96e7bbe50c9bd644f5b598deef665 /test_six.py | |
parent | 8ae6579382d93ddcd5d49adc8e46b3332ceb36d6 (diff) | |
download | six-git-911ac1a49e417e0bcb0a71df583d92dd4f894db6.tar.gz |
raise an AttributeError for six.moves.X when X is a module not available in the current interpreter
As discussed in https://github.com/pypa/pip/issues/1643.
Diffstat (limited to 'test_six.py')
-rw-r--r-- | test_six.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test_six.py b/test_six.py index 45649b2..47ad1ce 100644 --- a/test_six.py +++ b/test_six.py @@ -113,7 +113,8 @@ def test_move_items(item_name): if item_name.startswith("dbm_gnu") and not have_gdbm: py.test.skip("requires gdbm") raise - assert item_name in dir(six.moves) + if sys.version_info[:2] >= (2, 6): + assert item_name in dir(six.moves) @py.test.mark.parametrize("item_name", |