'Ending a line with semicolon should not cache the returned object (GH-307)'

def test_dont_cache_with_semicolon(self):

    oldlen = len(ip.user_ns['Out'])
    for cell in ['1;', '1;1;']:
        res = ip.run_cell(cell, store_history=True)
        newlen = len(ip.user_ns['Out'])
        self.assertEqual(oldlen, newlen)
        self.assertIsNone(res.result)
    i = 0
    for cell in ['1', '1;1']:
        ip.run_cell(cell, store_history=True)
        newlen = len(ip.user_ns['Out'])
        i += 1
        self.assertEqual((oldlen + i), newlen)
