comparison tests/test_fetch_symlinks.py @ 1106:5cb6c95e0283 stable

Merge default and stable so I can do stable releases again.
author Augie Fackler <raf@durin42.com>
date Tue, 11 Feb 2014 12:48:49 -0500
parents 8b6fb32b001e
children
comparison
equal deleted inserted replaced
1020:b5b1fce26f1f 1106:5cb6c95e0283
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')
59 self.assertEqual(ctx['exe'].flags(), 'x') 60 self.assertEqual(ctx['exe'].flags(), 'x')
60
61 def suite():
62 all_tests = [
63 unittest.TestLoader().loadTestsFromTestCase(TestFetchSymlinks),
64 unittest.TestLoader().loadTestsFromTestCase(TestMergeSpecial),
65 ]
66 return unittest.TestSuite(all_tests)