def check_ident(self, magic):
    out = _ip.run_cell_magic(magic, 'a', 'b')
    nt.assert_equal(out, ('a', 'b'))
    _ip.run_cell((('%%' + magic) + ' c\nd\n'))
    nt.assert_equal(_ip.user_ns['_'], ('c', 'd\n'))
def check_ident(self, magic):
    out = _ip.run_cell_magic(magic, 'a', 'b')
    nt.assert_equal(out, ('a', 'b'))
    _ip.run_cell((('%%' + magic) + ' c\nd\n'))
    nt.assert_equal(_ip.user_ns['_'], ('c', 'd\n'))