summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-03-12 22:05:55 +0100
committerGitHub <noreply@github.com>2021-03-12 22:05:55 +0100
commitb0be5546b68f91775221814712769b70c71fce38 (patch)
tree188a73d08ae2a50717eca8e9cc5f2fc3d39826ef
parent2a7e053495b35c6003034c63230a92b03f6d007a (diff)
parent79ed9036ec114140827fa08ccce1d512411b009c (diff)
downloadqutebrowser-b0be5546b68f91775221814712769b70c71fce38.tar.gz
qutebrowser-b0be5546b68f91775221814712769b70c71fce38.zip
Merge pull request #6254 from Lembrun/pathlib-/unit/mainwindow
Pathlib /unit/mainwindow
-rw-r--r--tests/unit/mainwindow/test_prompt.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/unit/mainwindow/test_prompt.py b/tests/unit/mainwindow/test_prompt.py
index f8d4cdee6..668cd0710 100644
--- a/tests/unit/mainwindow/test_prompt.py
+++ b/tests/unit/mainwindow/test_prompt.py
@@ -53,26 +53,26 @@ class TestFileCompletion:
(2, 'next', 'a'),
(2, 'prev', 'b'),
])
- def test_simple_completion(self, tmpdir, get_prompt, steps, where,
+ def test_simple_completion(self, tmp_path, get_prompt, steps, where,
subfolder):
"""Simply trying to tab through items."""
- testdir = tmpdir / 'test'
+ testdir = tmp_path / 'test'
for directory in 'abc':
- (testdir / directory).ensure(dir=True)
+ (testdir / directory).mkdir(parents=True)
prompt = get_prompt(str(testdir) + os.sep)
for _ in range(steps):
prompt.item_focus(where)
- assert prompt._lineedit.text() == str(testdir / subfolder)
+ assert prompt._lineedit.text() == str((testdir / subfolder).resolve())
- def test_backspacing_path(self, qtbot, tmpdir, get_prompt):
+ def test_backspacing_path(self, qtbot, tmp_path, get_prompt):
"""When we start deleting a path we want to see the subdir."""
- testdir = tmpdir / 'test'
+ testdir = tmp_path / 'test'
for directory in ['bar', 'foo']:
- (testdir / directory).ensure(dir=True)
+ (testdir / directory).mkdir(parents=True)
prompt = get_prompt(str(testdir / 'foo') + os.sep)