Skip to content

Commit

Permalink
added test for ipythonGH-284: ensure In variable is works
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanov committed Apr 3, 2011
1 parent 9e3dd31 commit a46148b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion IPython/core/tests/test_interactiveshell.py
Expand Up @@ -71,6 +71,15 @@ def test_dont_cache_with_semicolon(self):
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;')

0 comments on commit a46148b

Please sign in to comment.