From 542d13b70d6745ea3f047819ea416912054769c8 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 24 Nov 2015 16:17:07 +0100 Subject: [PATCH] tests: Add a not_xvfb marker. --- pytest.ini | 1 + tests/conftest.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pytest.ini b/pytest.ini index 36bc16868..81826c4e7 100644 --- a/pytest.ini +++ b/pytest.ini @@ -8,6 +8,7 @@ markers = osx: Tests which only can run on OS X. not_osx: Tests which can not run on OS X. not_frozen: Tests which can't be run if sys.frozen is True. + not_xvfb: Tests which can't be run with Xvfb. frozen: Tests which can only be run if sys.frozen is True. integration: Tests which test a bigger portion of code, run without coverage. flakes-ignore = diff --git a/tests/conftest.py b/tests/conftest.py index bdb155663..4088a0666 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -54,6 +54,8 @@ def _apply_platform_markers(item): "Can't be run when frozen"), ('frozen', not getattr(sys, 'frozen', False), "Can only run when frozen"), + ('not_xvfb', item.config.xvfb_display is not None, + "Can't be run with Xvfb."), ] for searched_marker, condition, default_reason in markers: