From a46148b952a68376730ddaa05a1f2bd6cfcbc231 2011-04-03 06:43:52 From: Paul Ivanov Date: 2011-04-03 06:43:52 Subject: [PATCH] added test for GH-284: ensure In variable is works --- diff --git a/IPython/core/tests/test_interactiveshell.py b/IPython/core/tests/test_interactiveshell.py index 7762f89..bf411fe 100644 --- a/IPython/core/tests/test_interactiveshell.py +++ b/IPython/core/tests/test_interactiveshell.py @@ -71,6 +71,15 @@ class InteractiveShellTestCase(unittest.TestCase): newlen = len(ip.user_ns['Out']) self.assertEquals(oldlen, newlen) #also test the default caching behavior - a = ip.run_cell('1') + ip.run_cell('1') newlen = len(ip.user_ns['Out']) self.assertEquals(oldlen+1, newlen) + + def test_In_variable(self): + "Verify that In variable grows with user input (GH-284)" + ip = get_ipython() + oldlen = len(ip.user_ns['In']) + ip.run_cell('1;') + newlen = len(ip.user_ns['In']) + self.assertEquals(oldlen+1, newlen) + self.assertEquals(ip.user_ns['In'][-1],'1;')