diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-03-12 22:06:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 22:06:54 +0100 |
commit | 3c7f9245e5a2b8f0bd80c39272efa469109429db (patch) | |
tree | 4c156a5e60bea94b117e14ef6f125068f1947f4d | |
parent | b0be5546b68f91775221814712769b70c71fce38 (diff) | |
parent | 28f4c40bc7fe1c744d0c0206485cb57a6540719e (diff) | |
download | qutebrowser-3c7f9245e5a2b8f0bd80c39272efa469109429db.tar.gz qutebrowser-3c7f9245e5a2b8f0bd80c39272efa469109429db.zip |
Merge pull request #6252 from Lembrun/pathlib-/unit/completion
Pathlib /unit/completion
-rw-r--r-- | tests/unit/completion/test_models.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unit/completion/test_models.py b/tests/unit/completion/test_models.py index 22e9c6490..12e623517 100644 --- a/tests/unit/completion/test_models.py +++ b/tests/unit/completion/test_models.py @@ -21,6 +21,7 @@ import collections import os +import pathlib import random import string import time @@ -426,11 +427,11 @@ def test_filesystem_completion(qtmodeltester, config_stub, info, homedir = str(local_files_path) monkeypatch.setenv('HOME', homedir) # POSIX monkeypatch.setenv('USERPROFILE', homedir) # Windows - assert os.path.expanduser('~') == homedir + assert str(pathlib.Path.home()) == homedir base = '~' - expected_1 = os.path.join('~', 'file1.txt') - expected_2 = os.path.join('~', 'file2.txt') + expected_1 = str(pathlib.Path('~') / 'file1.txt') + expected_2 = str(pathlib.Path('~') / 'file2.txt') config_stub.val.completion.open_categories = ['filesystem'] model = urlmodel.url(info=info) |