Show More
@@ -512,8 +512,10 b' class AutocallChecker(PrefilterChecker):' | |||||
512 | callable(oinfo.obj) |
|
512 | callable(oinfo.obj) | |
513 | and (not self.exclude_regexp.match(line_info.the_rest)) |
|
513 | and (not self.exclude_regexp.match(line_info.the_rest)) | |
514 | and self.function_name_regexp.match(line_info.ifun) |
|
514 | and self.function_name_regexp.match(line_info.ifun) | |
515 | and line_info.raw_the_rest.startswith(" ") |
|
515 | and ( | |
516 |
|
|
516 | line_info.raw_the_rest.startswith(" ") | |
|
517 | or not line_info.raw_the_rest.strip() | |||
|
518 | ) | |||
517 | ): |
|
519 | ): | |
518 | return self.prefilter_manager.get_handler_by_name("auto") |
|
520 | return self.prefilter_manager.get_handler_by_name("auto") | |
519 | else: |
|
521 | else: |
@@ -137,3 +137,13 b' def test_autocall_should_support_unicode():' | |||||
137 | finally: |
|
137 | finally: | |
138 | ip.run_line_magic("autocall", "0") |
|
138 | ip.run_line_magic("autocall", "0") | |
139 | del ip.user_ns["π"] |
|
139 | 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"] |
General Comments 0
You need to be logged in to leave comments.
Login now