File tree 6 files changed +35
-2
lines changed
6 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 4
4
__pycache__
5
5
.cache
6
6
.pytest_cache
7
+ .tox
8
+ .eggs
9
+ * .egg-info
10
+
7
11
8
12
# Created by https://www.gitignore.io/api/jetbrains+iml
9
13
Original file line number Diff line number Diff line change 9
9
10
10
script :
11
11
# run tasks marked as 'build_stage' first (ensure docker images are built)
12
- - py.test -vv -n auto -m "build_stage"
13
12
# run the remaining tasks in the test suite
14
- - py.test -vv -n auto -m "not build_stage"
13
+ - tox
Original file line number Diff line number Diff line change 3
3
pytest-xdist
4
4
pytest-cov
5
5
testinfra
6
+ tox
Original file line number Diff line number Diff line change
1
+ from setuptools import setup
2
+
3
+ setup (
4
+ setup_requires = ['pytest-runner' ],
5
+ tests_require = ['pytest' ],
6
+ )
Original file line number Diff line number Diff line change
1
+ # How do I test?
2
+
3
+ Make sure you have Docker and Python w/pip package manager.
4
+
5
+ From command line all you need to do is:
6
+
7
+ - ` pip install tox `
8
+ - ` tox `
9
+
10
+ # How do I debug python?
11
+
12
+ Highly recommended: Setup PyCharm on a ** Docker enabled** machine. Having a python debugger like PyCharm changes your life if you've never used it :)
13
+
Original file line number Diff line number Diff line change
1
+ [tox]
2
+ envlist = py27
3
+
4
+ [testenv]
5
+ whitelist_externals = docker
6
+ deps = -rrequirements.txt
7
+ commands = docker build -f test/debian.Dockerfile -t pytest_pihole:debian .
8
+ docker build -f test/centos.Dockerfile -t pytest_pihole:centos .
9
+ docker build -f test/fedora.Dockerfile -t pytest_pihole:fedora .
10
+ pytest {posargs:-vv -n auto} -m " not build_stage" ./test/
You can’t perform that action at this time.
0 commit comments