'Test pasting sources with trailing question marks'

def test_paste_trailing_question(self):

    tm = ip.magics_manager.registry['TerminalMagics']
    s = "def    funcfoo():\n            if    True:    #am    i    true?\n                            return    'fooresult'\n"
    ip.user_ns.pop('funcfoo', None)
    self.paste(s)
    nt.assert_equal(ip.user_ns['funcfoo'](), 'fooresult')
