def test_env_get_set_complex(self):
    env = _ip.magic("env var 'val1 '' 'val2")
    self.assertEqual(env, None)
    self.assertEqual(os.environ['var'], "'val1 '' 'val2")
    self.assertEqual(_ip.magic('env var'), "'val1 '' 'val2")
    env = _ip.magic('env var=val2 val3="val4')
    self.assertEqual(env, None)
    self.assertEqual(os.environ['var'], 'val2 val3="val4')
def test_env_get_set_complex(self):
    env = _ip.magic("env var 'val1  'val2")
    self.assertEqual(env, None)
    self.assertEqual(os.environ['var'], "'val1  'val2")
    self.assertEqual(_ip.magic('env var'), "'val1  'val2")
    env = _ip.magic('env var=val2 val3="val4')
    self.assertEqual(env, None)
    self.assertEqual(os.environ['var'], 'val2 val3="val4')