[Python-checkins] distutils2: merge with upstream

tarek.ziade python-checkins at python.org
Sun Jan 30 14:49:25 CET 2011


tarek.ziade pushed 69240ad43f64 to distutils2:

http://hg.python.org/distutils2/rev/69240ad43f64
changeset:   976:69240ad43f64
parent:      975:ce8f067c392a
parent:      973:aaa6cf4324b5
user:        Alexis Metaireau <alexis at notmyidea.org>
date:        Sun Jan 30 12:58:44 2011 +0100
summary:
  merge with upstream

files:
  

diff --git a/distutils2/tests/test_install.py b/distutils2/tests/test_install.py
--- a/distutils2/tests/test_install.py
+++ b/distutils2/tests/test_install.py
@@ -75,23 +75,6 @@
         return (args, kwargs) in self._called_with
 
 
-def patch(parent, to_patch):
-    """monkey match a module"""
-    def wrapper(func):
-        print func
-        print dir(func)
-        old_func = getattr(parent, to_patch)
-        def wrapped(*args, **kwargs):
-            parent.__dict__[to_patch] = MagicMock()
-            try:
-                out = func(*args, **kwargs)
-            finally:
-                setattr(parent, to_patch, old_func)
-            return out
-        return wrapped
-    return wrapper
-
-
 def get_installed_dists(dists):
     """Return a list of fake installed dists.
     The list is name, version, deps"""
@@ -105,12 +88,6 @@
     def _get_client(self, server, *args, **kwargs):
         return Client(server.full_address, *args, **kwargs)
 
-    def _patch_run_install(self):
-        """Patch run install"""
-
-    def _unpatch_run_install(self):
-        """Unpatch run install for d2 and d1"""
-
     def _get_results(self, output):
         """return a list of results"""
         installed = [(o.name, '%s' % o.version) for o in output['install']]

--
Repository URL: http://hg.python.org/distutils2


More information about the Python-checkins mailing list