Mercurial > hgsubversion
comparison tests/test_svnwrap.py @ 851:9ce00cb1d676
Merge alternate tunnel schemes.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Sat, 25 Feb 2012 14:51:22 -0600 |
parents | 312b37bc5e20 |
children | c58213aaf7c8 |
comparison
equal
deleted
inserted
replaced
850:d3bc067c0f72 | 851:9ce00cb1d676 |
---|---|
20 | 20 |
21 class TestBasicRepoLayout(unittest.TestCase): | 21 class TestBasicRepoLayout(unittest.TestCase): |
22 def setUp(self): | 22 def setUp(self): |
23 self.tmpdir = tempfile.mkdtemp('svnwrap_test') | 23 self.tmpdir = tempfile.mkdtemp('svnwrap_test') |
24 self.repo_path = '%s/testrepo' % self.tmpdir | 24 self.repo_path = '%s/testrepo' % self.tmpdir |
25 subprocess.call(['svnadmin', 'create', self.repo_path,]) | 25 subprocess.call(['svnadmin', 'create', self.repo_path, ]) |
26 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', | 26 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', |
27 'project_root_at_repo_root.svndump')) | 27 'project_root_at_repo_root.svndump')) |
28 proc = subprocess.call(['svnadmin', 'load', self.repo_path,], | 28 proc = subprocess.call(['svnadmin', 'load', self.repo_path, ], |
29 stdin=inp, | 29 stdin=inp, |
30 close_fds=test_util.canCloseFds, | 30 close_fds=test_util.canCloseFds, |
31 stdout=subprocess.PIPE, | 31 stdout=subprocess.PIPE, |
32 stderr=subprocess.STDOUT) | 32 stderr=subprocess.STDOUT) |
33 assert proc == 0 | 33 assert proc == 0 |
55 | 55 |
56 class TestRootAsSubdirOfRepo(TestBasicRepoLayout): | 56 class TestRootAsSubdirOfRepo(TestBasicRepoLayout): |
57 def setUp(self): | 57 def setUp(self): |
58 self.tmpdir = tempfile.mkdtemp('svnwrap_test') | 58 self.tmpdir = tempfile.mkdtemp('svnwrap_test') |
59 self.repo_path = '%s/testrepo' % self.tmpdir | 59 self.repo_path = '%s/testrepo' % self.tmpdir |
60 subprocess.call(['svnadmin', 'create', self.repo_path,]) | 60 subprocess.call(['svnadmin', 'create', self.repo_path, ]) |
61 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', | 61 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', |
62 'project_root_not_repo_root.svndump')) | 62 'project_root_not_repo_root.svndump')) |
63 ret = subprocess.call(['svnadmin', 'load', self.repo_path,], | 63 ret = subprocess.call(['svnadmin', 'load', self.repo_path, ], |
64 stdin=inp, | 64 stdin=inp, |
65 close_fds=test_util.canCloseFds, | 65 close_fds=test_util.canCloseFds, |
66 stdout=subprocess.PIPE, | 66 stdout=subprocess.PIPE, |
67 stderr=subprocess.STDOUT) | 67 stderr=subprocess.STDOUT) |
68 assert ret == 0 | 68 assert ret == 0 |
69 self.repo = svnwrap.SubversionRepo(test_util.fileurl( | 69 self.repo = svnwrap.SubversionRepo(test_util.fileurl( |
70 self.repo_path + '/dummyproj' | 70 self.repo_path + '/dummyproj' |
71 )) | 71 )) |
72 | 72 |
73 def suite(): | 73 def suite(): |
74 all = [unittest.TestLoader().loadTestsFromTestCase(TestBasicRepoLayout), | 74 all_tests = [unittest.TestLoader().loadTestsFromTestCase(TestBasicRepoLayout), |
75 unittest.TestLoader().loadTestsFromTestCase(TestRootAsSubdirOfRepo)] | 75 unittest.TestLoader().loadTestsFromTestCase(TestRootAsSubdirOfRepo)] |
76 return unittest.TestSuite(all) | 76 return unittest.TestSuite(all_tests) |