From 50aab7a802db7bd29b4136d52355ba11d2eb69bb Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 13 Sep 2017 17:53:49 +0200 Subject: [PATCH] Skip tests needing AppDataLocation on older Qt versions --- pytest.ini | 1 + tests/conftest.py | 1 + tests/unit/utils/test_standarddir.py | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/pytest.ini b/pytest.ini index 3d010cd37..1539ba7ac 100644 --- a/pytest.ini +++ b/pytest.ini @@ -27,6 +27,7 @@ markers = this: Used to mark tests during development no_invalid_lines: Don't fail on unparseable lines in end2end tests issue2478: Tests which are broken on Windows with QtWebEngine, https://github.com/qutebrowser/qutebrowser/issues/2478 + qt55: Tests only running on Qt 5.5 or later qt_log_level_fail = WARNING qt_log_ignore = ^SpellCheck: .* diff --git a/tests/conftest.py b/tests/conftest.py index 89e17dce2..720437105 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -62,6 +62,7 @@ def _apply_platform_markers(config, item): ('no_ci', 'CI' in os.environ, "Skipped on CI."), ('issue2478', os.name == 'nt' and config.webengine, "Broken with QtWebEngine on Windows"), + ('qt55', not qtutils.version_check('5.5'), "Requires Qt 5.5 or newer"), ] for searched_marker, condition, default_reason in markers: diff --git a/tests/unit/utils/test_standarddir.py b/tests/unit/utils/test_standarddir.py index b7c23071e..6bf133db6 100644 --- a/tests/unit/utils/test_standarddir.py +++ b/tests/unit/utils/test_standarddir.py @@ -53,6 +53,9 @@ def test_fake_mac_auto_config(tmpdir, monkeypatch): assert standarddir.config(auto=True) == expected +# FIXME:conf +# needs AppDataLocation +@pytest.mark.qt55 @pytest.mark.parametrize('what', ['data', 'config']) def test_fake_windows_data_config(tmpdir, monkeypatch, what): """Make sure the config is correct on a fake Windows.""" @@ -311,6 +314,9 @@ class TestSystemData: assert standarddir.data(system=True) == standarddir.data() +# FIXME:conf +# needs AppDataLocation +@pytest.mark.qt55 class TestDataMigrations: """Test moving various data from an old to a new location."""