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

Method test_builtins_id

IPython/core/tests/test_run.py:184–191  ·  view source on GitHub ↗

Check that %run doesn't damage __builtins__

(self)

Source from the content-addressed store, hash-verified

182 _ip.magic('run -p %s' % self.fname)
183
184 def test_builtins_id(self):
185 """Check that %run doesn't damage __builtins__ """
186 _ip = get_ipython()
187 # Test that the id of __builtins__ is not modified by %run
188 bid1 = id(_ip.user_ns['__builtins__'])
189 self.run_tmpfile()
190 bid2 = id(_ip.user_ns['__builtins__'])
191 nt.assert_equal(bid1, bid2)
192
193 def test_builtins_type(self):
194 """Check that the type of __builtins__ doesn't change with %run.

Callers

nothing calls this directly

Calls 2

run_tmpfileMethod · 0.95
get_ipythonFunction · 0.50

Tested by

no test coverage detected