diff --git a/Makefile b/Makefile index 514978035d9856f53f6cf695d5dc4534a9008054..267bef13a1731b10d03b1baf2710f31c32e1ea8d 100644 --- a/Makefile +++ b/Makefile @@ -53,8 +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 - export DISPLAY=:0.0 + echo "$$DISPLAY" + py.test + + +jw: export DISPLAY = :0.0 +jw: + echo "$$DISPLAY" py.test test-all: ## run tests on every Python version with tox diff --git a/flatland/utils/graphics_pil.py b/flatland/utils/graphics_pil.py index ceda3fd9f4c7d16b8a516dca8af43ea3122d51c7..b66c8dc55f38c321d038306f933de66493a6e6b3 100644 --- a/flatland/utils/graphics_pil.py +++ b/flatland/utils/graphics_pil.py @@ -86,7 +86,7 @@ class PILGL(GraphicsLayer): def create_layer(self, iLayer=0): if len(self.layers) <= iLayer: for i in range(len(self.layers), iLayer+1): - if i==0: + if i == 0: opacity = 255 # "bottom" layer is opaque (for rails) else: opacity = 0 # subsequent layers are transparent diff --git a/tox.ini b/tox.ini index 5a97b7e1c5b2f09db2cca8da5e1cf9db002f26f1..7b8636e68123bf70238a2e8c706aab05036d85d2 100644 --- a/tox.ini +++ b/tox.ini @@ -28,6 +28,7 @@ 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