1 new commit in py:

https://bitbucket.org/hpk42/py/changeset/af04d88f4d62/
changeset:   af04d88f4d62
user:        gutworth
date:        2012-04-18 21:01:52
summary:     use __new__ instead of __init__ like the classes they mock
affected #:  1 file

diff -r c21e9a77111e770a9139d8e90348c4e6f1ba2eb3 -r 
af04d88f4d6201296dc17fcc8b67b11c796cb7d9 testing/path/test_svnauth.py
--- a/testing/path/test_svnauth.py
+++ b/testing/path/test_svnauth.py
@@ -90,9 +90,10 @@
                                          '--no-auth-cache --non-interactive')
 
 class svnwc_no_svn(py.path.svnwc):
-    def __init__(self, *args, **kwargs):
+    def __new__(cls, *args, **kwargs):
+        self = super(svnwc_no_svn, cls).__new__(cls, *args, **kwargs)
         self.commands = []
-        super(svnwc_no_svn, self).__init__(*args, **kwargs)
+        return self
 
     def _svn(self, *args):
         self.commands.append(args)
@@ -130,9 +131,10 @@
 class svnurl_no_svn(py.path.svnurl):
     cmdexec_output = 'test'
     popen_output = 'test'
-    def __init__(self, *args, **kwargs):
-        py.path.svnurl.__init__(self, *args, **kwargs)
+    def __new__(cls, *args, **kwargs):
+        self = super(svnurl_no_svn, cls).__new__(cls, *args, **kwargs)
         self.commands = []
+        return self
 
     def _cmdexec(self, cmd):
         self.commands.append(cmd)

Repository URL: https://bitbucket.org/hpk42/py/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to