We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e568652 commit 0d58e50Copy full SHA for 0d58e50
1 file changed
tests/test_completer.py
@@ -2695,3 +2695,24 @@ def test_trim_expr(code, expected):
2695
)
2696
def test_match_numeric_literal_for_dict_key(input, expected):
2697
assert _match_number_in_dict_key_prefix(input) == expected
2698
+
2699
2700
+def test_completer_does_not_raise_value_error():
2701
+ ip = get_ipython()
2702
+ source = "\n".join(
2703
+ [
2704
+ "if cond:",
2705
+ " assert a.",
2706
+ ]
2707
+ )
2708
+ value_error = None
2709
+ with provisionalcompleter():
2710
+ try:
2711
+ completions = list(
2712
+ ip.Completer.completions(text=source, offset=len(source))
2713
2714
+ except ValueError as e:
2715
+ value_error = e
2716
+ completions = []
2717
+ assert isinstance(completions, list)
2718
+ assert value_error is None
0 commit comments