Mercurial > hgsubversion
comparison tests/test_utility_commands.py @ 337:46e69be8e2c8
Reorganize to have a more conventional module structure.
This means that hgsubversion now uses absolute imports instead of
relative ones, which makes the tests more reliable.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Wed, 13 May 2009 21:39:39 -0500 |
parents | 75f082b5897e |
children | 537de0300510 |
comparison
equal
deleted
inserted
replaced
336:c0b943cef0c3 | 337:46e69be8e2c8 |
---|---|
6 from mercurial import hg | 6 from mercurial import hg |
7 from mercurial import revlog | 7 from mercurial import revlog |
8 from mercurial import context | 8 from mercurial import context |
9 from mercurial import node | 9 from mercurial import node |
10 | 10 |
11 import util | 11 from hgsubversion import util |
12 import utility_commands | 12 from hgsubversion import utility_commands |
13 import test_util | 13 import test_util |
14 import wrappers | 14 from hgsubversion import wrappers |
15 | 15 |
16 expected_info_output = '''URL: %(repourl)s/%(branch)s | 16 expected_info_output = '''URL: %(repourl)s/%(branch)s |
17 Repository Root: %(repourl)s | 17 Repository Root: %(repourl)s |
18 Repository UUID: df2126f7-00ab-4d49-b42c-7e981dde0bcf | 18 Repository UUID: df2126f7-00ab-4d49-b42c-7e981dde0bcf |
19 Revision: %(rev)s | 19 Revision: %(rev)s |
172 self.assertEqual(self.repo['tip'].parents()[0].parents()[0], self.repo[0]) | 172 self.assertEqual(self.repo['tip'].parents()[0].parents()[0], self.repo[0]) |
173 self.assertNotEqual(beforerebasehash, self.repo['tip'].node()) | 173 self.assertNotEqual(beforerebasehash, self.repo['tip'].node()) |
174 | 174 |
175 def test_genignore(self): | 175 def test_genignore(self): |
176 """ Test generation of .hgignore file. """ | 176 """ Test generation of .hgignore file. """ |
177 test_util.load_fixture_and_fetch('ignores.svndump', self.repo_path, | 177 test_util.load_fixture_and_fetch('ignores.svndump', self.repo_path, |
178 self.wc_path, noupdate=False) | 178 self.wc_path, noupdate=False) |
179 u = ui.ui() | 179 u = ui.ui() |
180 u.pushbuffer() | 180 u.pushbuffer() |
181 utility_commands.genignore(u, self.repo, self.wc_path) | 181 utility_commands.genignore(u, self.repo, self.wc_path) |
182 self.assertEqual(open(os.path.join(self.wc_path, '.hgignore')).read(), | 182 self.assertEqual(open(os.path.join(self.wc_path, '.hgignore')).read(), |