diff options
author | Lembrun <amadeusk7@free.fr> | 2021-03-03 12:59:17 +0100 |
---|---|---|
committer | Lembrun <amadeusk7@free.fr> | 2021-03-03 12:59:17 +0100 |
commit | 38311a69a898dd44ea76fd80e271f10a6b235114 (patch) | |
tree | 3d9cde2c69290939b61949b4137ebc46e8d31eef /tests/unit/completion/test_models.py | |
parent | 024e7ec38d46b1b1759e34cc660d2b3e4f97de4d (diff) | |
download | qutebrowser-38311a69a898dd44ea76fd80e271f10a6b235114.tar.gz qutebrowser-38311a69a898dd44ea76fd80e271f10a6b235114.zip |
Replaced os.path by the pathlib equivalent
Diffstat (limited to 'tests/unit/completion/test_models.py')
-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 8a6b24557..15ebe7110 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('~').expanduser()) == homedir base = '~' - expected_1 = os.path.join('~', 'file1.txt') - expected_2 = os.path.join('~', 'file2.txt') + expected_1 = str(pathlib.Path('~').joinpath('file1.txt')) + expected_2 = str(pathlib.Path('~').joinpath('file2.txt')) config_stub.val.completion.open_categories = ['filesystem'] model = urlmodel.url(info=info) |