diff options
-rw-r--r-- | .travis.yml | 8 | ||||
-rw-r--r-- | test_six.py | 13 |
2 files changed, 17 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml index 1c74d92..890f584 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,14 @@ os: linux -dist: xenial +dist: focal language: python python: - 2.7 -- 3.4 - 3.5 - 3.6 - 3.7 - 3.8 - &mainstream_python 3.9 - nightly -- pypy - pypy3 install: - pip install --upgrade --force-reinstall "setuptools; python_version != '3.3'" "setuptools < 40; python_version == '3.3'" @@ -29,6 +27,10 @@ jobs: include: - python: 3.3 dist: trusty + - python: 3.4 + dist: trusty + - python: pypy + dist: trusty - stage: upload new version of python package to PYPI (only for tagged commits) python: *mainstream_python install: skip diff --git a/test_six.py b/test_six.py index 7b8b03b..076b3eb 100644 --- a/test_six.py +++ b/test_six.py @@ -113,6 +113,15 @@ except ImportError: except ImportError: have_gdbm = False +have_ndbm = True +try: + import dbm +except ImportError: + try: + import dbm.ndbm + except ImportError: + have_ndbm = False + @pytest.mark.parametrize("item_name", [item.name for item in six._moved_attributes]) def test_move_items(item_name): @@ -127,8 +136,10 @@ def test_move_items(item_name): if item_name.startswith("tkinter"): if not have_tkinter: pytest.skip("requires tkinter") - if item_name.startswith("dbm_gnu") and not have_gdbm: + if item_name == "dbm_gnu" and not have_gdbm: pytest.skip("requires gdbm") + if item_name == "dbm_ndbm": + pytest.skip("requires ndbm") raise assert item_name in dir(six.moves) |