diff options
author | Marc Abramowitz <marc@marc-abramowitz.com> | 2013-12-25 20:32:44 -0800 |
---|---|---|
committer | Marc Abramowitz <marc@marc-abramowitz.com> | 2013-12-25 20:32:44 -0800 |
commit | 3ed7bdb0af69fe162bd5c05795d8977905f337b3 (patch) | |
tree | b3de66639f3021ae46f6fe71a49cb0991a75fbc6 | |
parent | b92f218239ea695f23bebe6659c150b166dfc281 (diff) | |
download | six-3ed7bdb0af69fe162bd5c05795d8977905f337b3.tar.gz |
Don't fail test if gdbm is not available
-rw-r--r-- | test_six.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test_six.py b/test_six.py index efeb33e..fee58e2 100644 --- a/test_six.py +++ b/test_six.py @@ -84,6 +84,15 @@ except ImportError: else: have_tkinter = True +have_gdbm = True +try: + import gdbm +except ImportError: + try: + import dbm.gnu + except ImportError: + have_gdbm = False + @py.test.mark.parametrize("item_name", [item.name for item in six._moved_attributes]) def test_move_items(item_name): @@ -98,6 +107,8 @@ def test_move_items(item_name): py.test.skip("Windows only module") if item_name.startswith("tkinter") and not have_tkinter: py.test.skip("requires tkinter") + if item_name.startswith("dbm_gnu") and not have_gdbm: + py.test.skip("requires gdbm") raise |