diff --git a/Makefile b/Makefile index 267bef13a1731b10d03b1baf2710f31c32e1ea8d..e107ec0ac163ff4c778adcd84137c7142428f6d9 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/tox.ini b/tox.ini index 7b8636e68123bf70238a2e8c706aab05036d85d2..768d58db5192cb2a7363fc68ef3392842556479d 100644 --- a/tox.ini +++ b/tox.ini @@ -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}