diff --git a/.testr.conf b/.testr.conf index 5433c07..6d83b3c 100644 --- a/.testr.conf +++ b/.testr.conf @@ -1,4 +1,7 @@ [DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ tests $LISTOPT $IDOPTION +test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ + OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ + OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ + ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--list diff --git a/tests/__init__.py b/gerritlib/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to gerritlib/tests/__init__.py diff --git a/gerritlib/tests/base.py b/gerritlib/tests/base.py new file mode 100644 index 0000000..c44ed80 --- /dev/null +++ b/gerritlib/tests/base.py @@ -0,0 +1,5 @@ +import testtools + + +class TestCase(testtools.TestCase): + "Placeholder wrapper for the testtools.TestCase class." diff --git a/gerritlib/tests/test_gerritlib.py b/gerritlib/tests/test_gerritlib.py new file mode 100644 index 0000000..5d978e3 --- /dev/null +++ b/gerritlib/tests/test_gerritlib.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- + +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +""" +test_gerritlib +---------------------------------- + +Tests for `gerritlib` module. +""" + +from gerritlib.tests import base + + +class TestGerritlib(base.TestCase): + + def test_something(self): + pass diff --git a/test-requirements.txt b/test-requirements.txt index ebbf260..e928618 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,3 +2,4 @@ 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 4ccdd8e..1a12120 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ skipdist = True envlist = pep8, py27, pypy, py33, py34 [testenv] +commands = python setup.py test --slowest --testr-args='{posargs}' setenv = VIRTUAL_ENV={envdir} usedevelop = True install_command = pip install {opts} {packages}