changeset 1133:ff4e102932ed

tests: use util.load instead of bare pickle
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 17 Feb 2014 11:25:36 -0600
parents 0a55d7c9a071
children a9b6e38d6dc9
files tests/comprehensive/test_custom_layout.py tests/comprehensive/test_rebuildmeta.py tests/comprehensive/test_stupid_pull.py tests/comprehensive/test_verify_and_startrev.py
diffstat 4 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/tests/comprehensive/test_custom_layout.py
+++ b/tests/comprehensive/test_custom_layout.py
@@ -1,5 +1,4 @@
 import os
-import pickle
 import sys
 import unittest
 
--- a/tests/comprehensive/test_rebuildmeta.py
+++ b/tests/comprehensive/test_rebuildmeta.py
@@ -1,5 +1,4 @@
 import os
-import pickle
 import unittest
 import sys
 
@@ -19,6 +18,7 @@ from mercurial import ui
 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
@@ -125,8 +125,8 @@ def _run_assertions(self, name, single, 
         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:
--- a/tests/comprehensive/test_stupid_pull.py
+++ b/tests/comprehensive/test_stupid_pull.py
@@ -1,5 +1,4 @@
 import os
-import pickle
 import sys
 import unittest
 
--- a/tests/comprehensive/test_verify_and_startrev.py
+++ b/tests/comprehensive/test_verify_and_startrev.py
@@ -1,5 +1,4 @@
 import os
-import pickle
 import sys
 import unittest