Commits

Sean Farley committed ff4e102

tests: use util.load instead of bare pickle

Comments (0)

Files changed (4)

tests/comprehensive/test_custom_layout.py

 import os
-import pickle
 import sys
 import unittest
 

tests/comprehensive/test_rebuildmeta.py

 import os
-import pickle
 import unittest
 import sys
 
 from hgsubversion import compathacks
 from hgsubversion import svncommands
 from hgsubversion import svnmeta
+from hgsubversion import util
 
 # These test repositories have harmless skew in rebuildmeta for the
 # last-pulled-rev because the last rev in svn causes absolutely no
         except AttributeError:
           # hg 2.8 and earlier
           self.assertEqual(src.branchtags(), dest.branchtags())
-    srcbi = pickle.load(open(os.path.join(src.path, 'svn', 'branch_info')))
-    destbi = pickle.load(open(os.path.join(dest.path, 'svn', 'branch_info')))
+    srcbi = util.load(os.path.join(src.path, 'svn', 'branch_info'))
+    destbi = util.load(os.path.join(dest.path, 'svn', 'branch_info'))
     self.assertEqual(sorted(srcbi.keys()), sorted(destbi.keys()))
     revkeys = svnmeta.SVNMeta(dest).revmap.keys()
     for branch in destbi:

tests/comprehensive/test_stupid_pull.py

 import os
-import pickle
 import sys
 import unittest
 

tests/comprehensive/test_verify_and_startrev.py

 import os
-import pickle
 import sys
 import unittest