Mercurial > hgsubversion
diff svnwrap/tests/test_svnwrap.py @ 316:c3c647aff97c
Merge with danchr's changes.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Sun, 03 May 2009 21:44:53 -0500 |
parents | 9ad5cf45e30c |
children | 4f4db3d2fdbb |
line wrap: on
line diff
--- a/svnwrap/tests/test_svnwrap.py +++ b/svnwrap/tests/test_svnwrap.py @@ -1,5 +1,5 @@ import os -import popen2 +import subprocess import shutil import tempfile import unittest @@ -14,12 +14,12 @@ class TestBasicRepoLayout(unittest.TestC self.repo_path = '%s/testrepo' % self.tmpdir os.spawnvp(os.P_WAIT, 'svnadmin', ['svnadmin', 'create', self.repo_path,]) - proc = popen2.Popen4(['svnadmin', 'load', self.repo_path,]) inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', 'project_root_at_repo_root.svndump')) - proc.tochild.write(inp.read()) - proc.tochild.close() - proc.wait() + proc = subprocess.check_call(['svnadmin', 'load', self.repo_path,], + stdin=inp, close_fds=True, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) self.repo = svnwrap.SubversionRepo('file://%s' % self.repo_path) def tearDown(self): @@ -59,11 +59,11 @@ class TestRootAsSubdirOfRepo(TestBasicRe self.repo_path = '%s/testrepo' % self.tmpdir os.spawnvp(os.P_WAIT, 'svnadmin', ['svnadmin', 'create', self.repo_path,]) - proc = popen2.Popen4(['svnadmin', 'load', self.repo_path,]) inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', 'project_root_not_repo_root.svndump')) - proc.tochild.write(inp.read()) - proc.tochild.close() - proc.wait() + subprocess.check_call(['svnadmin', 'load', self.repo_path,], + stdin=inp, close_fds=True, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) self.repo = svnwrap.SubversionRepo('file://%s/dummyproj' % self.repo_path)