예제 #1
0
 def test_apply(self):
     """Test apply() function."""
     # Isolate our changes to os.environ and sys.path and return to the
     # original state to not mess with our test environment.
     with restore_os_environ(), restore_sys_path():
         r = ResolvedContext(["hello_world"])
         r.apply()
         self.assertEqual(os.environ.get("OH_HAI_WORLD"), "hello")
예제 #2
0
 def test_apply(self):
     """Test apply() function."""
     r = ResolvedContext(["hello_world"])
     r.apply()
     self.assertEqual(os.environ.get("OH_HAI_WORLD"), "hello")