Skip to content
Snippets Groups Projects
Commit 35f5af7b authored by hagrid67's avatar hagrid67
Browse files

try using xvfb-run inside Makefile for coverage (which runs py.test)

and in tox.ini for [testenv] which runs py.test
parent 1fdae873
No related branches found
No related tags found
No related merge requests found
......@@ -53,22 +53,15 @@ clean-test: ## remove test and coverage artifacts
lint: ## check style with flake8
flake8 flatland tests
test: export DISPLAY = :0
test: ## run tests quickly with the default Python
echo "$$DISPLAY"
py.test
jw: export DISPLAY = :0.0
jw:
echo "$$DISPLAY"
py.test
test-all: ## run tests on every Python version with tox
tox
coverage: ## check code coverage quickly with the default Python
coverage run --source flatland -m pytest
xvfb-run coverage run --source flatland -m pytest
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
......
......@@ -28,7 +28,6 @@ commands = make coverage
[testenv]
setenv =
PYTHONPATH = {toxinidir}
DISPLAY = :0
deps =
-r{toxinidir}/requirements_dev.txt
; If you want to make tox run the tests with the same versions, create a
......@@ -36,6 +35,7 @@ deps =
; -r{toxinidir}/requirements.txt
commands =
pip install -U pip
py.test --basetemp={envtmpdir}
sh -c 'echo DISPLAY: $DISPLAY'
xvfb-run py.test --basetemp={envtmpdir}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment