##// END OF EJS Templates
Fix https://bugs.launchpad.net/ipython/+bug/239054 - Made a more robust reset method to fully flush internal state and restore the system to a clean state. We'll need to see later if %reset should just call this. For now it's used to release resources.

File last commit:

r1859:4f847f55
r1859:4f847f55
Show More
test_iplib.py
16 lines | 516 B | text/x-python | PythonLexer
"""Tests for the key iplib module, where the main ipython class is defined.
"""
import nose.tools as nt
def test_reset():
"""reset must clear most namespaces."""
ip = _ip.IP
ip.reset() # first, it should run without error
# Then, check that most namespaces end up empty
for ns in ip.ns_refs_table:
if ns is ip.user_ns:
# The user namespace is reset with some data, so we can't check for
# it being empty
continue
nt.assert_equals(len(ns),0)