annotate tests/test_binaryfiles.py @ 430:2851b81c65ce

maps: make sure AuthorMaps don't overwrite themselves, fix overriding Author maps for the Python repo got truncated because of the author map stupidly writing upon itself. This patch implements a better and faster scenario, where entries will only be written to the saved author map if they're not coming from that file. They're also now streamed into the file directly, instead of having to re-open the file on every entry, and formatting is preserved.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 15 Jun 2009 16:09:27 +0200
parents 906d3f302b45
children d2ef7220a079
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
169
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
1 import unittest
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
2
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
3 import test_util
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
4
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
5 class TestFetchBinaryFiles(test_util.TestBase):
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
6 def test_binaryfiles(self, stupid=False):
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
7 repo = self._load_fixture_and_fetch('binaryfiles.svndump', stupid=stupid)
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
8 self.assertEqual('cce7fe400d8d', str(repo['tip']))
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
9
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
10 def test_binaryfiles_stupid(self):
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
11 self.test_binaryfiles(True)
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
12
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
13 def suite():
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
14 all = [unittest.TestLoader().loadTestsFromTestCase(TestFetchBinaryFiles),
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
15 ]
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
16 return unittest.TestSuite(all)