Inheritance diagram for IPython.testing.globalipapp:
Global IPython app to support test running.
We must start our own ipython object and heavily muck with it so that all the modifications IPython makes to system behavior don’t send the doctest machinery into a fit. This code should be considered a gross hack, but it gets the job done.
Proxy for sys.stdout/err. This will request the stream at call time allowing for nose’s Capture plugin’s redirection of sys.stdout/err.
name : str
A special subclass of dict for use as an IPython namespace in doctests.
This subclass adds a simple checkpointing capability so that when testing machinery clears it (we use it as the test execution context), it doesn’t get completely destroyed.
In addition, it can handle the presence of the ‘_’ key in a special manner, which is needed because of how Python’s doctest machinery operates with ‘_’. See constructor and update() for details.
D.copy() -> a shallow copy of D
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v. v defaults to None.
D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
D.has_key(k) -> True if D has a key k, else False
D.items() -> list of D’s (key, value) pairs, as 2-tuples
D.iteritems() -> an iterator over the (key, value) items of D
D.iterkeys() -> an iterator over the keys of D
D.itervalues() -> an iterator over the values of D
D.keys() -> list of D’s keys
D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
D.values() -> list of D’s values
D.viewitems() -> a set-like object providing a view on D’s items
D.viewkeys() -> a set-like object providing a view on D’s keys
D.viewvalues() -> an object providing a view on D’s values