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

Method test_env_get_set_simple

IPython/core/tests/test_magic.py:770–777  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

768 assert env["VAR"] == "abc"
769
770 def test_env_get_set_simple(self):
771 env = _ip.magic("env var val1")
772 self.assertEqual(env, None)
773 self.assertEqual(os.environ['var'], 'val1')
774 self.assertEqual(_ip.magic("env var"), 'val1')
775 env = _ip.magic("env var=val2")
776 self.assertEqual(env, None)
777 self.assertEqual(os.environ['var'], 'val2')
778
779 def test_env_get_set_complex(self):
780 env = _ip.magic("env var 'val1 '' 'val2")

Callers

nothing calls this directly

Calls 1

magicMethod · 0.45

Tested by

no test coverage detected