[Python-checkins] distutils2: docstring for safely_replace
tarek.ziade
python-checkins at python.org
Sun Sep 19 10:20:22 CEST 2010
tarek.ziade pushed ac596bebd950 to distutils2:
http://hg.python.org/distutils2/rev/ac596bebd950
changeset: 637:ac596bebd950
user: Konrad Delong <konryd at gmail.com>
date: Sun Aug 15 20:22:27 2010 +0200
summary: docstring for safely_replace
files: src/distutils2/tests/test_test.py
diff --git a/src/distutils2/tests/test_test.py b/src/distutils2/tests/test_test.py
--- a/src/distutils2/tests/test_test.py
+++ b/src/distutils2/tests/test_test.py
@@ -79,6 +79,10 @@
return temp_pkg_dir
def safely_replace(self, obj, attr, new_val=None, delete=False):
+ """Replace a object's attribute returning to its original state at the
+ end of the test run. Creates the attribute if not present before
+ (deleting afterwards). When delete=True, makes sure the value is del'd
+ for the test run."""
orig_has_attr = hasattr(obj, attr)
orig_val = getattr(obj, attr, None)
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list