Replaced os.path by the pathlib equivalent

This commit is contained in:
Lembrun 2021-03-03 12:59:17 +01:00
parent 024e7ec38d
commit 38311a69a8
1 changed files with 4 additions and 3 deletions

View File

@ -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)