comparison tests/test_fetch_symlinks.py @ 1065:8b6fb32b001e

test_fetch_symlinks: use stupid mode metaclass
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 09 Aug 2013 23:45:56 +0200
parents d741f536f23a
children
comparison
equal deleted inserted replaced
1064:dc516f85b6c3 1065:8b6fb32b001e
1 import test_util 1 import test_util
2 2
3 import unittest 3 import unittest
4 4
5 class TestFetchSymlinks(test_util.TestBase): 5 class TestFetchSymlinks(test_util.TestBase):
6 def test_symlinks(self, stupid=False): 6 stupid_mode_tests = True
7 repo = self._load_fixture_and_fetch('symlinks.svndump', stupid=stupid) 7
8 def test_symlinks(self):
9 repo = self._load_fixture_and_fetch('symlinks.svndump')
8 # Check symlinks throughout history 10 # Check symlinks throughout history
9 links = { 11 links = {
10 0: { 12 0: {
11 'linka': 'a', 13 'linka': 'a',
12 'linka2': 'a', 14 'linka2': 'a',
45 if f in links[rev]: 47 if f in links[rev]:
46 self.assertEqual(links[rev][f], ctx[f].data()) 48 self.assertEqual(links[rev][f], ctx[f].data())
47 for f in links[rev]: 49 for f in links[rev]:
48 self.assertTrue(f in ctx) 50 self.assertTrue(f in ctx)
49 51
50 def test_symlinks_stupid(self): 52 class TestMergeSpecial(test_util.TestBase):
51 self.test_symlinks(True) 53 stupid_mode_tests = True
52 54
53 class TestMergeSpecial(test_util.TestBase):
54 def test_special(self): 55 def test_special(self):
55 repo = self._load_fixture_and_fetch('addspecial.svndump', 56 repo = self._load_fixture_and_fetch('addspecial.svndump',
56 subdir='trunk') 57 subdir='trunk')
57 ctx = repo['tip'] 58 ctx = repo['tip']
58 self.assertEqual(ctx['fnord'].flags(), 'l') 59 self.assertEqual(ctx['fnord'].flags(), 'l')