MCPcopy Index your code
hub / github.com/ipython/ipython / test_paste_trailing_question

Method test_paste_trailing_question

tests/test_magic_terminal.py:210–220  ·  view source on GitHub ↗

Test pasting sources with trailing question marks

(self)

Source from the content-addressed store, hash-verified

208 self.assertIn("foo", ip.user_ns)
209
210 def test_paste_trailing_question(self):
211 "Test pasting sources with trailing question marks"
212 tm = ip.magics_manager.registry["TerminalMagics"]
213 s = """\
214def funcfoo():
215 if True: #am i true?
216 return 'fooresult'
217"""
218 ip.user_ns.pop("funcfoo", None)
219 self.paste(s)
220 self.assertEqual(ip.user_ns["funcfoo"](), "fooresult")

Callers

nothing calls this directly

Calls 2

pasteMethod · 0.95
popMethod · 0.80

Tested by

no test coverage detected