Add test for QtWebKit-NG in test_version
This commit is contained in:
parent
859974fa99
commit
038a517c5a
@ -646,6 +646,7 @@ class FakeQSslSocket:
|
||||
(True, True, False, True, True), # no style
|
||||
(True, False, True, False, True), # different Qt
|
||||
(True, False, True, True, False), # no webkit
|
||||
(True, False, True, True, 'ng'), # QtWebKit-NG
|
||||
])
|
||||
def test_version_output(git_commit, frozen, style, equal_qt, with_webkit,
|
||||
stubs, monkeypatch):
|
||||
@ -673,6 +674,8 @@ def test_version_output(git_commit, frozen, style, equal_qt, with_webkit,
|
||||
stubs.FakeQApplication(instance=None)),
|
||||
'objects.backend': (usertypes.Backend.QtWebKit if with_webkit
|
||||
else usertypes.Backend.QtWebEngine),
|
||||
'qtutils.is_qtwebkit_ng': (lambda v:
|
||||
True if with_webkit == 'ng' else False),
|
||||
}
|
||||
|
||||
for attr, val in patches.items():
|
||||
@ -715,8 +718,13 @@ def test_version_output(git_commit, frozen, style, equal_qt, with_webkit,
|
||||
'frozen': str(frozen),
|
||||
'import_path': import_path,
|
||||
'webkit': 'WEBKIT VERSION' if with_webkit else 'no',
|
||||
'backend': 'QtWebKit' if with_webkit else 'QtWebEngine',
|
||||
}
|
||||
backends = {
|
||||
True: 'QtWebKit',
|
||||
False: 'QtWebEngine',
|
||||
'ng': 'QtWebKit-NG',
|
||||
}
|
||||
substitutions['backend'] = backends[with_webkit]
|
||||
|
||||
expected = template.rstrip('\n').format(**substitutions)
|
||||
assert version.version() == expected
|
||||
|
Loading…
Reference in New Issue
Block a user