MCPcopy Create free account
hub / github.com/ipython/ipython / setup

Method setup

IPython/core/tests/test_pylabtools.py:154–171  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

152 pass
153
154 def setup(self):
155 import matplotlib
156 def act_mpl(backend):
157 matplotlib.rcParams['backend'] = backend
158
159 # Save rcParams since they get modified
160 self._saved_rcParams = matplotlib.rcParams
161 self._saved_rcParamsOrig = matplotlib.rcParamsOrig
162 matplotlib.rcParams = dict(backend='Qt4Agg')
163 matplotlib.rcParamsOrig = dict(backend='Qt4Agg')
164
165 # Mock out functions
166 self._save_am = pt.activate_matplotlib
167 pt.activate_matplotlib = act_mpl
168 self._save_ip = pt.import_pylab
169 pt.import_pylab = lambda *a,**kw:None
170 self._save_cis = pt.configure_inline_support
171 pt.configure_inline_support = lambda *a,**kw:None
172
173 def teardown(self):
174 pt.activate_matplotlib = self._save_am

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected