summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-03-12 22:06:54 +0100
committerGitHub <noreply@github.com>2021-03-12 22:06:54 +0100
commit3c7f9245e5a2b8f0bd80c39272efa469109429db (patch)
tree4c156a5e60bea94b117e14ef6f125068f1947f4d
parentb0be5546b68f91775221814712769b70c71fce38 (diff)
parent28f4c40bc7fe1c744d0c0206485cb57a6540719e (diff)
downloadqutebrowser-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.py7
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)