@@ -2651,17 +2651,17 @@ def test_completion_context(line, expected):
26512651@pytest .mark .parametrize (
26522652 "line,expected,expected_after_assignment" ,
26532653 [
2654- ("ls file" , True , False ), # overshadowed by variable
2655- ("ls ." , True , False ),
2656- ("ls file." , True , False ),
2657- ("%ls .file.ext" , True , True ), # magic, not affected by variable
2658- ("!ls file." , True , True ), # bang, not affected by variable
2654+ ("test file" , True , False ), # overshadowed by variable
2655+ ("test ." , True , False ),
2656+ ("test file." , True , False ),
2657+ ("%test .file.ext" , True , True ), # magic, not affected by variable
2658+ ("!test file." , True , True ), # bang, not affected by variable
26592659 ],
26602660)
26612661def test_completion_in_cli_context (line , expected , expected_after_assignment ):
26622662 """Test completion context with and without variable overshadowing"""
26632663 ip = get_ipython ()
2664- print ( " \n \n DEBUG: \n " , ip . alias_manager . aliases )
2664+ ip . run_cell ( "alias test echo test" )
26652665 get_context = ip .Completer ._is_completing_in_cli_context
26662666
26672667 # Normal case
@@ -2670,13 +2670,13 @@ def test_completion_in_cli_context(line, expected, expected_after_assignment):
26702670
26712671 # Test with alias assigned as a variable
26722672 try :
2673- ip .user_ns ["ls " ] = "some_value"
2673+ ip .user_ns ["test " ] = "some_value"
26742674 result_after_assignment = get_context (line )
26752675 assert (
26762676 result_after_assignment == expected_after_assignment
26772677 ), f"Failed after assigning 'ls' as a variable for input: '{ line } '"
26782678 finally :
2679- ip .user_ns .pop ("ls " , None )
2679+ ip .user_ns .pop ("test " , None )
26802680
26812681@pytest .mark .xfail (reason = "Completion context not yet supported" )
26822682@pytest .mark .parametrize (
0 commit comments