set up for unit tests
Set up commands to run to execute new unit tests. Ignore output from testr and coverage. Rename the dist to match the package name so that the testr/coverage integration works properly. Add test-requirements.txt with some common testing dependencies. Change-Id: Ic6f34df893f3981a9af6122456b9feb9c80b31dd Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
5fc5838791
commit
f58b6b7eb9
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
/.tox/
|
||||
/releases.egg-info/
|
||||
/*.egg-info/
|
||||
/.eggs/
|
||||
/AUTHORS
|
||||
/ChangeLog
|
||||
@ -7,3 +7,6 @@
|
||||
*~
|
||||
*.pyc
|
||||
/doc/source/teams/*.rst
|
||||
/.coverage*
|
||||
/.testrepository/
|
||||
/cover/
|
||||
|
4
.testr.conf
Normal file
4
.testr.conf
Normal file
@ -0,0 +1,4 @@
|
||||
[DEFAULT]
|
||||
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
@ -1,5 +1,5 @@
|
||||
[metadata]
|
||||
name = releases
|
||||
name = openstack_releases
|
||||
summary = OpenStack Releases
|
||||
description-file =
|
||||
README.rst
|
||||
|
17
test-requirements.txt
Normal file
17
test-requirements.txt
Normal file
@ -0,0 +1,17 @@
|
||||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
hacking<0.11,>=0.10.0
|
||||
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
python-subunit>=0.0.18 # Apache-2.0/BSD
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
testtools>=1.4.0 # MIT
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
|
||||
coverage>=4.0 # Apache-2.0
|
||||
|
||||
# mocking framework
|
||||
mock>=2.0 # BSD
|
4
tox.ini
4
tox.ini
@ -12,6 +12,10 @@ setenv =
|
||||
# launchpadlib 0.0.1.dev533 requires lazr.restfulclient, which is
|
||||
# py2-only (as of lazr.restfulclient 0.13.1)
|
||||
basepython = python2.7
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands =
|
||||
python setup.py testr --coverage --testr-args='{posargs}'
|
||||
coverage report --show-missing
|
||||
|
||||
[testenv:validate]
|
||||
deps =
|
||||
|
Loading…
Reference in New Issue
Block a user