diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-09-01 16:54:14 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-09-01 16:54:14 -0400 |
commit | 165bfdf768d59dce1a80cb1f17a1248dc5aa45b1 (patch) | |
tree | 1a261aa490b33a29e05e5429612207b1ea487e06 | |
parent | 13e1b252498ace3d35341fee27ac74c647c8914d (diff) | |
download | six-165bfdf768d59dce1a80cb1f17a1248dc5aa45b1.tar.gz |
skip tests for things not in 2.4/2.5
-rw-r--r-- | test_six.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test_six.py b/test_six.py index 7d835ae..81d1776 100644 --- a/test_six.py +++ b/test_six.py @@ -90,6 +90,9 @@ def test_move_items(item_name): """Ensure that everything loads correctly.""" try: getattr(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+") except ImportError: if item_name == "winreg" and not sys.platform.startswith("win"): py.test.skip("Windows only module") @@ -102,6 +105,10 @@ def test_move_items(item_name): [item.name for item in six._urllib_parse_moved_attributes]) def test_move_items_urllib_parse(item_name): """Ensure that everything loads correctly.""" + if item_name == "ParseResult" and sys.version_info < (2, 5): + py.test.skip("ParseResult is only found on 2.5+") + if item_name in ("parse_qs", "parse_qsl") and sys.version_info < (2, 6): + py.test.skip("parse_qs[l] is new in 2.6") getattr(six.moves.urllib.parse, item_name) @@ -156,6 +163,7 @@ def test_zip(): assert six.advance_iterator(zip(range(2), range(2))) == (0, 0) +@py.test.mark.skipif("sys.version_info < (2, 6)") def test_zip_longest(): from six.moves import zip_longest it = zip_longest(range(2), range(1)) |