diff options
author | Florian Bruhin <git@the-compiler.org> | 2017-10-08 19:08:37 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2017-10-08 19:08:37 +0200 |
commit | 6c3f90146f9742f3854faf7b096a3fb99d145d16 (patch) | |
tree | 5f5bd68aa1d725872b3a2e266a313f7a74f150bc /tests/unit/utils/test_qtutils.py | |
parent | 13b764744315c0fdd1c1644e4f5b043904d76333 (diff) | |
download | qutebrowser-6c3f90146f9742f3854faf7b096a3fb99d145d16.tar.gz qutebrowser-6c3f90146f9742f3854faf7b096a3fb99d145d16.zip |
Make qtutils.version_check strict by default
This also renames 'strict' to 'compiled' to be more descriptive.
It also fixes a crash when starting qutebrowser with an older compiled Qt
version which was introduced recently (calling setSpellCheckEnabled).
Diffstat (limited to 'tests/unit/utils/test_qtutils.py')
-rw-r--r-- | tests/unit/utils/test_qtutils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unit/utils/test_qtutils.py b/tests/unit/utils/test_qtutils.py index 8045bb0d3..64870f82c 100644 --- a/tests/unit/utils/test_qtutils.py +++ b/tests/unit/utils/test_qtutils.py @@ -74,11 +74,12 @@ def test_version_check(monkeypatch, qversion, compiled, version, exact, monkeypatch.setattr(qtutils, 'qVersion', lambda: qversion) if compiled is not None: monkeypatch.setattr(qtutils, 'QT_VERSION_STR', compiled) - strict = True + compiled_arg = True else: - strict = False + compiled_arg = False - assert qtutils.version_check(version, exact, strict=strict) == expected + actual = qtutils.version_check(version, exact, compiled=compiled_arg) + assert actual == expected @pytest.mark.parametrize('version, is_new', [ |