-
-
Save bitprophet/119f731f038ebd789835 to your computer and use it in GitHub Desktop.
Test that settings are restored.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test that settings are restored. | |
diff --git a/tests/test_context_managers.py b/tests/test_context_managers.py | |
--- a/tests/test_context_managers.py | |
+++ b/tests/test_context_managers.py | |
@@ -5,6 +5,15 @@ from nose.tools import eq_ | |
from fabric.state import env | |
from fabric.context_managers import cd, settings | |
+# | |
+# settings() | |
+# | |
+ | |
+def test_settings_restored(): | |
+ env.user = "bar" | |
+ with settings(user="foo"): | |
+ assert env.user == "foo" | |
+ assert env.user == "bar" | |
# | |
# cd() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment