comparison tests/test_push_eol.py @ 1072:23992b41b6b7

test_push_eol: use stupid mode metaclass
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 09 Aug 2013 23:45:59 +0200
parents 2d7398fffd0d
children
comparison
equal deleted inserted replaced
1071:56979160b3f7 1072:23992b41b6b7
2 2
3 import unittest 3 import unittest
4 4
5 class TestPushEol(test_util.TestBase): 5 class TestPushEol(test_util.TestBase):
6 obsolete_mode_tests = True 6 obsolete_mode_tests = True
7 stupid_mode_tests = True
7 8
8 def setUp(self): 9 def setUp(self):
9 test_util.TestBase.setUp(self) 10 test_util.TestBase.setUp(self)
10 self._load_fixture_and_fetch('emptyrepo.svndump') 11 self._load_fixture_and_fetch('emptyrepo.svndump')
11 12
12 def _test_push_dirs(self, stupid): 13 def test_push_dirs(self):
13 changes = [ 14 changes = [
14 # Root files with LF, CRLF and mixed EOL 15 # Root files with LF, CRLF and mixed EOL
15 ('lf', 'lf', 'a\nb\n\nc'), 16 ('lf', 'lf', 'a\nb\n\nc'),
16 ('crlf', 'crlf', 'a\r\nb\r\n\r\nc'), 17 ('crlf', 'crlf', 'a\r\nb\r\n\r\nc'),
17 ('mixed', 'mixed', 'a\r\nb\n\r\nc\nd'), 18 ('mixed', 'mixed', 'a\r\nb\n\r\nc\nd'),
18 ] 19 ]
19 self.commitchanges(changes) 20 self.commitchanges(changes)
20 self.pushrevisions(stupid) 21 self.pushrevisions()
21 self.assertchanges(changes, self.repo['tip']) 22 self.assertchanges(changes, self.repo['tip'])
22 23
23 changes = [ 24 changes = [
24 # Update all files once, with same EOL 25 # Update all files once, with same EOL
25 ('lf', 'lf', 'a\nb\n\nc\na\nb\n\nc'), 26 ('lf', 'lf', 'a\nb\n\nc\na\nb\n\nc'),
26 ('crlf', 'crlf', 'a\r\nb\r\n\r\nc\r\na\r\nb\r\n\r\nc'), 27 ('crlf', 'crlf', 'a\r\nb\r\n\r\nc\r\na\r\nb\r\n\r\nc'),
27 ('mixed', 'mixed', 'a\r\nb\n\r\nc\nd\r\na\r\nb\n\r\nc\nd'), 28 ('mixed', 'mixed', 'a\r\nb\n\r\nc\nd\r\na\r\nb\n\r\nc\nd'),
28 ] 29 ]
29 self.commitchanges(changes) 30 self.commitchanges(changes)
30 self.pushrevisions(stupid) 31 self.pushrevisions()
31 self.assertchanges(changes, self.repo['tip']) 32 self.assertchanges(changes, self.repo['tip'])
32
33 def test_push_dirs(self):
34 self._test_push_dirs(False)
35
36 def test_push_dirs_stupid(self):
37 self._test_push_dirs(True)