summaryrefslogtreecommitdiff
path: root/tests/test_fetch_mappings.py
diff options
context:
space:
mode:
authorJavi Merino <vicho@debian.org>2015-04-26 10:39:12 +0100
committerJavi Merino <vicho@debian.org>2015-04-26 10:39:12 +0100
commite3dadeacf189da700cbcc4dde9c535d07534a347 (patch)
treebd66f19794ead77a150ffbe20427e3f4b14dc7db /tests/test_fetch_mappings.py
parent6e1b099dbc4754626cb8972659b4b19b9ed5c717 (diff)
Upstream version 1.8
Diffstat (limited to 'tests/test_fetch_mappings.py')
-rw-r--r--tests/test_fetch_mappings.py24
1 files changed, 7 insertions, 17 deletions
diff --git a/tests/test_fetch_mappings.py b/tests/test_fetch_mappings.py
index 219b1a4..f022c6f 100644
--- a/tests/test_fetch_mappings.py
+++ b/tests/test_fetch_mappings.py
@@ -84,10 +84,15 @@ class MapTests(test_util.TestBase):
def test_author_map_no_overwrite(self):
cwd = os.path.dirname(__file__)
orig = os.path.join(cwd, 'fixtures', 'author-map-test.txt')
- new = open(self.authors, 'w')
+ # create a fake hgsubversion repo
+ repopath = os.path.join(self.wc_path, '.hg')
+ repopath = os.path.join(repopath, 'svn')
+ if not os.path.isdir(repopath):
+ os.makedirs(repopath)
+ new = open(os.path.join(repopath, 'authors'), 'w')
new.write(open(orig).read())
new.close()
- test = maps.AuthorMap(self.ui(), self.authors)
+ test = maps.AuthorMap(self.repo.svnmeta(skiperrorcheck=True))
fromself = set(test)
test.load(orig)
all_tests = set(test)
@@ -285,21 +290,6 @@ class MapTests(test_util.TestBase):
for r in repo:
self.assertEquals(verify.verify(ui, repo, rev=r), 0)
- def test_branchmap_no_replacement(self):
- '''
- test that empty mappings are rejected
-
- Empty mappings are lines like 'this ='. The most sensible thing to do
- is to not convert the 'this' branches. Until we can do that, we settle
- with aborting.
- '''
- repo_path = self.load_svndump('propset-branch.svndump')
- branchmap = open(self.branchmap, 'w')
- branchmap.write("closeme =\n")
- branchmap.close()
- self.assertRaises(hgutil.Abort,
- maps.BranchMap, self.ui(), self.branchmap)
-
def test_tagmap(self):
repo_path = self.load_svndump('basic_tag_tests.svndump')
tagmap = open(self.tagmap, 'w')