Mercurial > hgsubversion
comparison tests/test_svnwrap.py @ 478:37304494cd15
No os.spawnvp() in Windows, use subprocess.call() instead
author | Risto Kankkunen <risto.kankkunen@iki.fi> |
---|---|
date | Wed, 29 Jul 2009 16:34:15 +0300 |
parents | 537de0300510 |
children | 83fcb1cf6d8f |
comparison
equal
deleted
inserted
replaced
387:f6050c4dde31 | 478:37304494cd15 |
---|---|
11 | 11 |
12 class TestBasicRepoLayout(unittest.TestCase): | 12 class TestBasicRepoLayout(unittest.TestCase): |
13 def setUp(self): | 13 def setUp(self): |
14 self.tmpdir = tempfile.mkdtemp('svnwrap_test') | 14 self.tmpdir = tempfile.mkdtemp('svnwrap_test') |
15 self.repo_path = '%s/testrepo' % self.tmpdir | 15 self.repo_path = '%s/testrepo' % self.tmpdir |
16 os.spawnvp(os.P_WAIT, 'svnadmin', ['svnadmin', 'create', | 16 subprocess.call(['svnadmin', 'create', self.repo_path,]) |
17 self.repo_path,]) | |
18 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', | 17 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', |
19 'project_root_at_repo_root.svndump')) | 18 'project_root_at_repo_root.svndump')) |
20 proc = subprocess.call(['svnadmin', 'load', self.repo_path,], | 19 proc = subprocess.call(['svnadmin', 'load', self.repo_path,], |
21 stdin=inp, close_fds=True, | 20 stdin=inp, close_fds=True, |
22 stdout=subprocess.PIPE, | 21 stdout=subprocess.PIPE, |
57 | 56 |
58 class TestRootAsSubdirOfRepo(TestBasicRepoLayout): | 57 class TestRootAsSubdirOfRepo(TestBasicRepoLayout): |
59 def setUp(self): | 58 def setUp(self): |
60 self.tmpdir = tempfile.mkdtemp('svnwrap_test') | 59 self.tmpdir = tempfile.mkdtemp('svnwrap_test') |
61 self.repo_path = '%s/testrepo' % self.tmpdir | 60 self.repo_path = '%s/testrepo' % self.tmpdir |
62 os.spawnvp(os.P_WAIT, 'svnadmin', ['svnadmin', 'create', | 61 subprocess.call(['svnadmin', 'create', self.repo_path,]) |
63 self.repo_path,]) | |
64 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', | 62 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', |
65 'project_root_not_repo_root.svndump')) | 63 'project_root_not_repo_root.svndump')) |
66 ret = subprocess.call(['svnadmin', 'load', self.repo_path,], | 64 ret = subprocess.call(['svnadmin', 'load', self.repo_path,], |
67 stdin=inp, close_fds=True, | 65 stdin=inp, close_fds=True, |
68 stdout=subprocess.PIPE, | 66 stdout=subprocess.PIPE, |