Seeing if indenting more fixes
This commit is contained in:
parent
2219b0f0ac
commit
ce2c48b972
|
|
@ -150,12 +150,12 @@ class TestFileCompletion:
|
|||
# _set_fileview_root isn't run unless there is an actual keypress
|
||||
qtbot.keyPress(prompt._lineedit, Qt.Key_AsciiTilde)
|
||||
|
||||
assert (pathlib.Path(prompt._file_model.rootPath()) /
|
||||
prompt._to_complete) == pathlib.Path.home()
|
||||
# The first character on the lineedit should remain ~
|
||||
prompt.item_focus('next')
|
||||
prompt.item_focus('next')
|
||||
assert prompt._lineedit.text()[0] == '~'
|
||||
assert (pathlib.Path(prompt._file_model.rootPath()) /
|
||||
prompt._to_complete) == pathlib.Path.home()
|
||||
# The first character on the lineedit should remain ~
|
||||
prompt.item_focus('next')
|
||||
prompt.item_focus('next')
|
||||
assert prompt._lineedit.text()[0] == '~'
|
||||
|
||||
def test_expand_once(self, qtbot, get_prompt, home_path):
|
||||
home_path.joinpath(*home_path.parts[1:]).mkdir(parents=True)
|
||||
|
|
@ -166,8 +166,8 @@ class TestFileCompletion:
|
|||
# _set_fileview_root isn't run unless there is an actual keypress
|
||||
qtbot.keyPress(prompt._lineedit, Qt.Key_Slash)
|
||||
|
||||
# The second instance of home_path shouldn't be replaced with ~
|
||||
assert prompt._lineedit.text()[:-1] == '~' + str(home_path)
|
||||
# The second instance of home_path shouldn't be replaced with ~
|
||||
assert prompt._lineedit.text()[:-1] == '~' + str(home_path)
|
||||
|
||||
def test_dont_contract(self, qtbot, get_prompt, home_path):
|
||||
for directory in ['bar', 'bat', 'foo']:
|
||||
|
|
@ -179,8 +179,8 @@ class TestFileCompletion:
|
|||
# _set_fileview_root isn't run unless there is an actual keypress
|
||||
qtbot.keyPress(prompt._lineedit, Qt.Key_Slash)
|
||||
|
||||
prompt.item_focus('next')
|
||||
prompt.item_focus('next')
|
||||
# If $HOME is contracted to `~` this test will fail as that is unexpected
|
||||
assert (prompt._lineedit.text() !=
|
||||
prompt._lineedit.text().replace(os.path.expanduser('~'), '~', 1))
|
||||
prompt.item_focus('next')
|
||||
prompt.item_focus('next')
|
||||
# If $HOME is contracted to `~` this test will fail as that is unexpected
|
||||
assert (prompt._lineedit.text() !=
|
||||
prompt._lineedit.text().replace(os.path.expanduser('~'), '~', 1))
|
||||
|
|
|
|||
Loading…
Reference in New Issue