changeset 1077:8f3a241b790d

test_utility_commands: use stupid mode metaclass
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 09 Aug 2013 23:46:02 +0200
parents 58b2d84df5e7
children 1afd308b8f46
files tests/test_utility_commands.py
diffstat 1 files changed, 9 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_utility_commands.py
+++ b/tests/test_utility_commands.py
@@ -31,6 +31,8 @@ def repourl(repo_path):
     return util.normalize_url(test_util.fileurl(repo_path))
 
 class UtilityTests(test_util.TestBase):
+    stupid_mode_tests = True
+
     def test_info_output(self):
         repo, repo_path = self.load_and_fetch('two_heads.svndump')
         hg.update(self.repo, 'the_branch')
@@ -266,16 +268,16 @@ class UtilityTests(test_util.TestBase):
                                 authors=author_path)
         self.assertMultiLineEqual(open(author_path).read(), 'Augie=\nevil=\n')
 
-    def test_svnverify(self, stupid=False):
+    def test_svnverify(self):
         repo, repo_path = self.load_and_fetch('binaryfiles.svndump',
-                                              noupdate=False, stupid=stupid)
-        ret = verify.verify(self.ui(), repo, [], rev=1, stupid=stupid)
+                                              noupdate=False)
+        ret = verify.verify(self.ui(), repo, [], rev=1)
         self.assertEqual(0, ret)
         repo_path = self.load_svndump('binaryfiles-broken.svndump')
         u = self.ui()
         u.pushbuffer()
         ret = verify.verify(u, repo, [test_util.fileurl(repo_path)],
-                            rev=1, stupid=stupid)
+                            rev=1)
         output = u.popbuffer()
         self.assertEqual(1, ret)
         output = re.sub(r'file://\S+', 'file://', output)
@@ -286,20 +288,16 @@ unexpected file: binary1
 missing file: binary3
 """, output)
 
-    def test_svnverify_stupid(self):
-        self.test_svnverify(True)
-
-    def test_corruption(self, stupid=False):
+    def test_corruption(self):
         SUCCESS = 0
         FAILURE = 1
 
         repo, repo_path = self.load_and_fetch('correct.svndump', layout='single',
-                                              subdir='', stupid=stupid)
+                                              subdir='')
 
         ui = self.ui()
 
-        self.assertEqual(SUCCESS, verify.verify(ui, self.repo, rev='tip',
-                                                stupid=stupid))
+        self.assertEqual(SUCCESS, verify.verify(ui, self.repo, rev='tip'))
 
         corrupt_source = test_util.fileurl(self.load_svndump('corrupt.svndump'))
 
@@ -325,9 +323,6 @@ missing file: binary3
 
         self.assertEqual((FAILURE, expected), (code, actual))
 
-    def test_corruption_stupid(self):
-        self.test_corruption(True)
-
     def test_svnrebuildmeta(self):
         otherpath = self.load_svndump('binaryfiles-broken.svndump')
         otherurl = test_util.fileurl(otherpath)