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: