@@ -1225,7 +1225,7 @@ def test_dot_completions(completions_codeeditor, qtbot):
1225
1225
@pytest .mark .order (1 )
1226
1226
@pytest .mark .parametrize (
1227
1227
"filename" , ['000_test.txt' , '.hidden' , 'any_file.txt' , 'abc.py' ,
1228
- 'part.0.parquet' , '/home' , '/usr/bin' ])
1228
+ 'part.0.parquet' , '/home' , '/usr/bin' , r'C:\\Users' ])
1229
1229
def test_file_completions (filename , mock_completions_codeeditor , qtbot ):
1230
1230
"""
1231
1231
Test that completions for files are handled as expected.
@@ -1256,6 +1256,9 @@ def test_file_completions(filename, mock_completions_codeeditor, qtbot):
1256
1256
# This checks that we can insert file completions next to a / placed at
1257
1257
# second-level
1258
1258
qtbot .keyClicks (code_editor , "'/usr/'" )
1259
+ elif filename == r'C:\\Users' :
1260
+ # This checks that we can insert file completions next to a \
1261
+ qtbot .keyClicks (code_editor , r"'C:\\'" )
1259
1262
else :
1260
1263
qtbot .keyClicks (code_editor , f"'{ filename [0 ]} '" )
1261
1264
code_editor .moveCursor (QTextCursor .PreviousCharacter )
@@ -1266,6 +1269,8 @@ def test_file_completions(filename, mock_completions_codeeditor, qtbot):
1266
1269
completion_text = 'home'
1267
1270
elif filename == '/usr/bin' :
1268
1271
completion_text = 'bin'
1272
+ elif filename == r'C:\\Users' :
1273
+ completion_text = 'Users'
1269
1274
else :
1270
1275
completion_text = filename
1271
1276
0 commit comments