From 89b4adf158029122124be62f43139f3c28b7cd4a Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 15 Sep 2015 20:44:39 +0200 Subject: [PATCH] standarddir: Fix runtime basedir test on OS X. --- pytest.ini | 1 + tests/conftest.py | 2 ++ tests/unit/utils/test_standarddir.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 116063be4..8fc69dc7a 100644 --- a/pytest.ini +++ b/pytest.ini @@ -6,6 +6,7 @@ markers = windows: Tests which only can run on Windows. linux: Tests which only can run on Linux. 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. frozen: Tests which can only be run if sys.frozen is True. integration: Tests which test a bigger portion of code, run without coverage. diff --git a/tests/conftest.py b/tests/conftest.py index b00d9ec8b..b1e68b0a9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -90,6 +90,8 @@ def pytest_runtest_setup(item): pytest.skip("Requires Linux.") elif item.get_marker('osx') and sys.platform != 'darwin': pytest.skip("Requires OS X.") + elif item.get_marker('not_osx') and sys.platform == 'darwin': + pytest.skip("Skipped on OS X.") elif item.get_marker('not_frozen') and getattr(sys, 'frozen', False): pytest.skip("Can't be run when frozen!") elif item.get_marker('frozen') and not getattr(sys, 'frozen', False): diff --git a/tests/unit/utils/test_standarddir.py b/tests/unit/utils/test_standarddir.py index 0642f08cf..91efe6b02 100644 --- a/tests/unit/utils/test_standarddir.py +++ b/tests/unit/utils/test_standarddir.py @@ -211,7 +211,7 @@ class TestArguments: assert standarddir.runtime() == str(tmpdir / 'qute_test') @pytest.mark.parametrize('typ', ['config', 'data', 'cache', 'download', - 'runtime']) + pytest.mark.not_osx('runtime')]) def test_basedir(self, tmpdir, typ): """Test --basedir.""" expected = str(tmpdir / typ)