Skip to content

Commit 3e0dafa

Browse files
committed
test for autocall regression
Without the fix in ipython#14513, this test would fail with > assert ip.prefilter("foo") == "foo" E AssertionError: assert 'foo()' == 'foo'
1 parent 09e8eed commit 3e0dafa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

IPython/core/tests/test_prefilter.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,13 @@ def test_autocall_should_support_unicode():
137137
finally:
138138
ip.run_line_magic("autocall", "0")
139139
del ip.user_ns["π"]
140+
141+
142+
def test_autocall_regression_gh_14513():
143+
ip.run_line_magic("autocall", "2")
144+
ip.user_ns["foo"] = dict()
145+
try:
146+
assert ip.prefilter("foo") == "foo"
147+
finally:
148+
ip.run_line_magic("autocall", "0")
149+
del ip.user_ns["foo"]

0 commit comments

Comments
 (0)