[py-svn] r11664 - in py/dist/py: misc path path/local path/local/testing path/svn path/testing

hpk at codespeak.net hpk at codespeak.net
Sat Apr 30 23:57:40 CEST 2005


Author: hpk
Date: Sat Apr 30 23:57:40 2005
New Revision: 11664

Modified:
   py/dist/py/misc/rest.py
   py/dist/py/path/common.py
   py/dist/py/path/local/local.py
   py/dist/py/path/local/testing/test_local.py
   py/dist/py/path/svn/wccommand.py
   py/dist/py/path/testing/fscommon.py
Log:
renamed loadobj to load()
renamed dumpobj to dump()
to better match the pickle-names. 



Modified: py/dist/py/misc/rest.py
==============================================================================
--- py/dist/py/misc/rest.py	(original)
+++ py/dist/py/misc/rest.py	Sat Apr 30 23:57:40 2005
@@ -43,5 +43,5 @@
     #log("wrote %r" % htmlpath)
     #if txtpath.check(svnwc=1, versioned=1): 
     #    info = txtpath.info()
-    #    svninfopath.dumpobj(info) 
+    #    svninfopath.dump(info) 
 

Modified: py/dist/py/path/common.py
==============================================================================
--- py/dist/py/path/common.py	(original)
+++ py/dist/py/path/common.py	Sat Apr 30 23:57:40 2005
@@ -303,7 +303,7 @@
             finally:
                 f.close()
 
-    def loadobj(self):
+    def load(self):
         """ return object unpickled from self.read() """
         f = self.open('rb')
         try:

Modified: py/dist/py/path/local/local.py
==============================================================================
--- py/dist/py/path/local/local.py	(original)
+++ py/dist/py/path/local/local.py	Sat Apr 30 23:57:40 2005
@@ -231,7 +231,7 @@
     def rename(self, target):
         return self._callex(os.rename, str(self), str(target))
 
-    def dumpobj(self, obj, bin=1):
+    def dump(self, obj, bin=1):
         """ pickle object into path location"""
         f = self.open('wb')
         try:

Modified: py/dist/py/path/local/testing/test_local.py
==============================================================================
--- py/dist/py/path/local/testing/test_local.py	(original)
+++ py/dist/py/path/local/testing/test_local.py	Sat Apr 30 23:57:40 2005
@@ -47,7 +47,7 @@
             try:
                 d = {'answer' : 42}
                 path = local(name)
-                path.dumpobj(d, bin=bin)
+                path.dump(d, bin=bin)
                 from cPickle import load
                 dnew = load(f)
                 assert d == dnew

Modified: py/dist/py/path/svn/wccommand.py
==============================================================================
--- py/dist/py/path/svn/wccommand.py	(original)
+++ py/dist/py/path/svn/wccommand.py	Sat Apr 30 23:57:40 2005
@@ -40,8 +40,8 @@
         assert isinstance(self._url, str)
         return self._url
 
-    def dumpobj(self, obj):
-        return self.localpath.dumpobj(obj)
+    def dump(self, obj):
+        return self.localpath.dump(obj)
 
     def svnurl(self):
         """ return current SvnPath for this WC-item. """

Modified: py/dist/py/path/testing/fscommon.py
==============================================================================
--- py/dist/py/path/testing/fscommon.py	(original)
+++ py/dist/py/path/testing/fscommon.py	Sat Apr 30 23:57:40 2005
@@ -17,7 +17,7 @@
     execfilepy.write('x=42')
 
     d = {1:2, 'hello': 'world', 'answer': 42}
-    path.ensure('samplepickle').dumpobj(d)
+    path.ensure('samplepickle').dump(d)
 
     sampledir = path.ensure('sampledir', dir=1)
     sampledir.ensure('otherfile')
@@ -130,7 +130,7 @@
 
     def test_load(self):
         p = self.root.join('samplepickle')
-        obj = p.loadobj()
+        obj = p.load()
         assert type(obj) is dict
         assert obj.get('answer',None) == 42
 



More information about the pytest-commit mailing list