diff tests/test_fetch_renames.py @ 1064:dc516f85b6c3

test_fetch_renames: use stupid mode metaclass
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 09 Aug 2013 23:45:55 +0200
parents d741f536f23a
children 0d0132cba155
line wrap: on
line diff
--- a/tests/test_fetch_renames.py
+++ b/tests/test_fetch_renames.py
@@ -4,6 +4,8 @@ import sys
 import unittest
 
 class TestFetchRenames(test_util.TestBase):
+    stupid_mode_tests = True
+
     def _debug_print_copies(self, repo):
         w = sys.stderr.write
         for rev in repo:
@@ -13,12 +15,11 @@ class TestFetchRenames(test_util.TestBas
                 fctx = ctx[f]
                 w('%s: %r %r\n' % (f, fctx.data(), fctx.renamed()))
 
-    def _test_rename(self, stupid):
+    def test_rename(self):
         config = {
             'hgsubversion.filestoresize': '0',
             }
-        repo = self._load_fixture_and_fetch('renames.svndump', stupid=stupid,
-                config=config)
+        repo = self._load_fixture_and_fetch('renames.svndump', config=config)
 
         # Map revnum to mappings of dest name to (source name, dest content)
         copies = {
@@ -56,23 +57,11 @@ class TestFetchRenames(test_util.TestBas
 
         self.assertEqual(repo['tip']['changed3'].data(), 'changed\nchanged3\n')
 
-    def test_rename(self):
-        self._test_rename(False)
-
-    def test_rename_stupid(self):
-        self._test_rename(True)
-
-    def _test_case(self, stupid):
-        repo = self._load_fixture_and_fetch('filecase.svndump', stupid=stupid)
+    def test_case(self):
+        repo = self._load_fixture_and_fetch('filecase.svndump')
         files = {
             0: ['A', 'a', 'e/a', 'b', 'd/a', 'D/a', 'f/a', 'F'],
             1: ['A', 'a', 'E/a', 'B', 'd/A', 'D/a', 'f/a', 'F'],
             }
         for rev in repo:
             self.assertEqual(sorted(files[rev]), sorted(repo[rev].manifest()))
-
-    def test_case(self):
-        self._test_case(False)
-
-    def test_case_stupid(self):
-        self._test_case(True)