Fix version output test on Windows
On Windows we get something like C:\IMPORTPATH instead of /IMPORTPATH
This commit is contained in:
parent
674b316db3
commit
29ee605c79
@ -625,8 +625,9 @@ class FakeQSslSocket:
|
||||
def test_version_output(git_commit, harfbuzz, frozen, style, equal_qt,
|
||||
stubs, monkeypatch):
|
||||
"""Test version.version()."""
|
||||
import_path = os.path.abspath('/IMPORTPATH')
|
||||
patches = {
|
||||
'qutebrowser.__file__': '/IMPORTPATH/__init__.py',
|
||||
'qutebrowser.__file__': os.path.join(import_path, '__init__.py'),
|
||||
'qutebrowser.__version__': 'VERSION',
|
||||
'_git_str': lambda: ('GIT COMMIT' if git_commit else None),
|
||||
'platform.python_implementation': lambda: 'PYTHON IMPLEMENTATION',
|
||||
@ -678,7 +679,7 @@ def test_version_output(git_commit, harfbuzz, frozen, style, equal_qt,
|
||||
Platform: PLATFORM, ARCHITECTURE
|
||||
Desktop: DESKTOP
|
||||
Frozen: {frozen}
|
||||
Imported from /IMPORTPATH
|
||||
Imported from {import_path}
|
||||
OS INFO 1
|
||||
OS INFO 2
|
||||
""".lstrip('\n'))
|
||||
@ -689,7 +690,8 @@ def test_version_output(git_commit, harfbuzz, frozen, style, equal_qt,
|
||||
'qt': ('QT VERSION' if equal_qt else
|
||||
'QT RUNTIME VERSION (compiled QT VERSION)'),
|
||||
'harfbuzz': 'HARFBUZZ' if harfbuzz else 'system',
|
||||
'frozen': str(frozen)
|
||||
'frozen': str(frozen),
|
||||
'import_path': import_path,
|
||||
}
|
||||
|
||||
expected = template.rstrip('\n').format(**substitutions)
|
||||
|
Loading…
Reference in New Issue
Block a user