set up stestr

include a stub test file just so that stestr doesn't error out because
there are no tests

Change-Id: Id4a9e1dfecca8f52ac03f7a7b68af95dcea42c50
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-04-29 14:03:03 -04:00
parent 33601a70d8
commit ab4cd7d192
6 changed files with 39 additions and 4 deletions

1
.gitignore vendored
View File

@ -19,3 +19,4 @@ dist/
# Files created by releasenotes build
releasenotes/build
/.stestr/

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=./goal_tools/tests/
top_dir=./

View File

View File

@ -0,0 +1,19 @@
# 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.
import unittest
class TestStub(unittest.TestCase):
def test(self):
pass

7
test-requirements.txt Normal file
View File

@ -0,0 +1,7 @@
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
python-subunit>=1.0.0 # Apache-2.0/BSD
requests-mock>=1.2.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT

13
tox.ini
View File

@ -1,16 +1,21 @@
[tox]
minversion = 2.0
distribute = False
envlist = py35,pep8
[testenv]
basepython = python3
install_command = pip install {opts} {packages}
usedevelop = True
deps =
-r{toxinidir}/requirements.txt
# commands =
# python setup.py test --coverage --coverage-package-name=oslo_config --slowest --testr-args='{posargs}'
# coverage report --show-missing
-r{toxinidir}/test-requirements.txt
setenv =
PYTHON=coverage run --source goal_tools --parallel-mode
commands =
stestr run {posargs}
stestr slowest
coverage combine
coverage html -d cover
[testenv:pep8]
deps =