diff --git a/.zuul.yaml b/.zuul.yaml index 391528e..5e2f19e 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -11,6 +11,12 @@ check: jobs: - gerritlib-jeepyb-integration + - tox-py36 + - tox-py37 + - tox-py38 gate: jobs: - gerritlib-jeepyb-integration + - tox-py36 + - tox-py37 + - tox-py38 diff --git a/gerritlib/tests/base.py b/gerritlib/tests/base.py index c44ed80..710045f 100644 --- a/gerritlib/tests/base.py +++ b/gerritlib/tests/base.py @@ -1,5 +1,5 @@ -import testtools +import unittest -class TestCase(testtools.TestCase): - "Placeholder wrapper for the testtools.TestCase class." +class TestCase(unittest.TestCase): + "Placeholder wrapper for the TestCase class." diff --git a/gerritlib/tests/test_gerritlib.py b/gerritlib/tests/test_gerritlib.py index 5d978e3..b5f3ebc 100644 --- a/gerritlib/tests/test_gerritlib.py +++ b/gerritlib/tests/test_gerritlib.py @@ -19,10 +19,13 @@ test_gerritlib Tests for `gerritlib` module. """ +from gerritlib.gerrit import GerritConnection from gerritlib.tests import base +from paramiko.ssh_exception import NoValidConnectionsError class TestGerritlib(base.TestCase): - def test_something(self): - pass + def test_invalid_connection(self): + with self.assertRaises(NoValidConnectionsError): + GerritConnection(connection_attempts=1, retry_delay=1).connect() diff --git a/setup.cfg b/setup.cfg index 50fb51a..f200ba6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,7 +20,10 @@ classifier = Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 - Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 [files] packages = gerritlib diff --git a/test-requirements.txt b/test-requirements.txt index e928618..ebbf260 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,4 +2,3 @@ hacking>=0.5.6,<0.11 sphinx>=1.1.2,<1.2 python-subunit testrepository -testtools diff --git a/tox.ini b/tox.ini index a030331..0471f14 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,9 @@ [tox] minversion = 1.6 -skipdist = True -skip_missing_interpreters = true +skipsdist = True +skip_missing_interpreters = false # https://docs.python.org/devguide/#status-of-python-branches -envlist = pep8, py27, pypy, py33, py34, py35, py36, py37 +envlist = pep8, py{38,37,36,35,27,py} [testenv] commands = python setup.py test --slowest --testr-args='{posargs}'