Signed-off-by: Adam Hill <adam@diginc.us>
pull/2262/head
Adam Hill 6 years ago
parent fff31558a0
commit 88e4b6390c
No known key found for this signature in database
GPG Key ID: 2193804FCA429855

4
.gitignore vendored

@ -4,6 +4,10 @@
__pycache__
.cache
.pytest_cache
.tox
.eggs
*.egg-info
# Created by https://www.gitignore.io/api/jetbrains+iml

@ -9,6 +9,5 @@ install:
script:
# run tasks marked as 'build_stage' first (ensure docker images are built)
- py.test -vv -n auto -m "build_stage"
# run the remaining tasks in the test suite
- py.test -vv -n auto -m "not build_stage"
- tox

@ -3,3 +3,4 @@ pytest
pytest-xdist
pytest-cov
testinfra
tox

@ -0,0 +1,6 @@
from setuptools import setup
setup(
setup_requires=['pytest-runner'],
tests_require=['pytest'],
)

@ -0,0 +1,13 @@
# How do I test?
Make sure you have Docker and Python w/pip package manager.
From command line all you need to do is:
- `pip install tox`
- `tox`
# How do I debug python?
Highly recommended: Setup PyCharm on a **Docker enabled** machine. Having a python debugger like PyCharm changes your life if you've never used it :)

@ -0,0 +1,10 @@
[tox]
envlist = py27
[testenv]
whitelist_externals = docker
deps = -rrequirements.txt
commands = docker build -f test/debian.Dockerfile -t pytest_pihole:debian .
docker build -f test/centos.Dockerfile -t pytest_pihole:centos .
docker build -f test/fedora.Dockerfile -t pytest_pihole:fedora .
pytest {posargs:-vv -n auto} -m "not build_stage" ./test/
Loading…
Cancel
Save