Replaced os.path by the pathlib equivalent
This commit is contained in:
parent
024e7ec38d
commit
38311a69a8
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue