mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-26 10:21:09 +00:00
test: add support for running tox tests
Setup tox to run both flake8 and nosetests Signed-off-by: Dan Streetman <ddstreet@canonical.com>
This commit is contained in:
parent
e7f0447342
commit
3eefdec9b6
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
|
.coverage
|
||||||
|
.tox
|
||||||
/ubuntu_dev_tools.egg-info/
|
/ubuntu_dev_tools.egg-info/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
|
9
requirements.txt
Normal file
9
requirements.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
python-debian
|
||||||
|
python-debianbts
|
||||||
|
distro-info
|
||||||
|
httplib2
|
||||||
|
launchpadlib
|
||||||
|
requests
|
||||||
|
setuptools
|
||||||
|
termcolor
|
||||||
|
pyyaml
|
4
test-requirements.txt
Normal file
4
test-requirements.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
coverage
|
||||||
|
flake8 >= 3.8.0
|
||||||
|
nose
|
||||||
|
mock
|
23
tox.ini
Normal file
23
tox.ini
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[tox]
|
||||||
|
envlist = flake8,nose
|
||||||
|
skipsdist = True
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
base_python = python3
|
||||||
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
|
PYTHONHASHSEED=0
|
||||||
|
usedevelop = True
|
||||||
|
deps = -r{toxinidir}/requirements.txt
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
install_command = pip install {opts} {packages}
|
||||||
|
|
||||||
|
[testenv:flake8]
|
||||||
|
commands = flake8 {posargs}
|
||||||
|
|
||||||
|
[testenv:nose]
|
||||||
|
commands = nosetests -v --with-coverage --cover-package=ubuntutools {posargs:ubuntutools}
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
verbose = 2
|
||||||
|
max-line-length = 99
|
||||||
|
extend-exclude = ubuntu-archive-assistant,ubuntu_archive_assistant
|
Loading…
x
Reference in New Issue
Block a user