diff --git a/.gitignore b/.gitignore index 46a9ede..20a512f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.coverage +.tox /ubuntu_dev_tools.egg-info/ __pycache__/ *.pyc diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3dee953 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +python-debian +python-debianbts +distro-info +httplib2 +launchpadlib +requests +setuptools +termcolor +pyyaml diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..aadf5ca --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,4 @@ +coverage +flake8 >= 3.8.0 +nose +mock diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..74f956f --- /dev/null +++ b/tox.ini @@ -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