changeset 643:d2ef7220a079

tests: import test_util as the first module in all relevant tests
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Wed, 14 Jul 2010 15:39:18 +0200
parents c2d606a1dc6f
children 95abc4cfc78f
files tests/test_binaryfiles.py tests/test_diff.py tests/test_externals.py tests/test_fetch_branches.py tests/test_fetch_command.py tests/test_fetch_exec.py tests/test_fetch_mappings.py tests/test_fetch_renames.py tests/test_fetch_symlinks.py tests/test_fetch_truncated.py tests/test_push_command.py tests/test_push_dirs.py tests/test_push_eol.py tests/test_push_renames.py tests/test_rebuildmeta.py tests/test_single_dir_clone.py tests/test_svnwrap.py tests/test_tags.py tests/test_utility_commands.py
diffstat 19 files changed, 37 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_binaryfiles.py
+++ b/tests/test_binaryfiles.py
@@ -1,7 +1,7 @@
-import unittest
-
 import test_util
 
+import unittest
+
 class TestFetchBinaryFiles(test_util.TestBase):
     def test_binaryfiles(self, stupid=False):
         repo = self._load_fixture_and_fetch('binaryfiles.svndump', stupid=stupid)
--- a/tests/test_diff.py
+++ b/tests/test_diff.py
@@ -1,3 +1,5 @@
+import test_util
+
 import unittest
 import tests
 
@@ -5,8 +7,6 @@ from mercurial import ui
 
 from hgsubversion import wrappers
 
-import test_util
-
 expected_diff_output = '''Index: alpha
 ===================================================================
 --- alpha\t(revision 3)
--- a/tests/test_externals.py
+++ b/tests/test_externals.py
@@ -1,9 +1,10 @@
+import test_util
+
 import os, unittest
 
 from mercurial import commands
 
 from hgsubversion import svnexternals
-import test_util
 
 class TestFetchExternals(test_util.TestBase):
     def test_externalsfile(self):
--- a/tests/test_fetch_branches.py
+++ b/tests/test_fetch_branches.py
@@ -1,12 +1,11 @@
+import test_util
+
 import unittest
 
 from mercurial import hg
 from mercurial import node
 from mercurial import util as hgutil
 
-import test_util
-
-
 class TestFetchBranches(test_util.TestBase):
     def _load_fixture_and_fetch(self, fixture_name, stupid, noupdate=True,
                                 subdir=''):
--- a/tests/test_fetch_command.py
+++ b/tests/test_fetch_command.py
@@ -1,11 +1,11 @@
+import test_util
+
 import unittest
 
 from mercurial import hg
 from mercurial import node
 from mercurial import ui
 
-import test_util
-
 class TestBasicRepoLayout(test_util.TestBase):
 
     def test_no_dates(self):
--- a/tests/test_fetch_exec.py
+++ b/tests/test_fetch_exec.py
@@ -1,9 +1,9 @@
+import test_util
+
 import unittest
 
 from mercurial import node
 
-import test_util
-
 class TestFetchExec(test_util.TestBase):
     def _load_fixture_and_fetch(self, fixture_name, stupid):
         return test_util.load_fixture_and_fetch(fixture_name, self.repo_path,
--- a/tests/test_fetch_mappings.py
+++ b/tests/test_fetch_mappings.py
@@ -1,5 +1,7 @@
 """Tests for author maps and file maps.
 """
+import test_util
+
 import os
 import unittest
 
@@ -8,8 +10,6 @@ from mercurial import hg
 from mercurial import node
 from mercurial import util as hgutil
 
-import test_util
-
 from hgsubversion import maps
 from hgsubversion import svncommands
 
--- a/tests/test_fetch_renames.py
+++ b/tests/test_fetch_renames.py
@@ -1,8 +1,7 @@
-import sys
-import unittest
-
 import test_util
 
+import sys
+import unittest
 
 class TestFetchRenames(test_util.TestBase):
     def _debug_print_copies(self, repo):
--- a/tests/test_fetch_symlinks.py
+++ b/tests/test_fetch_symlinks.py
@@ -1,7 +1,6 @@
-import unittest
-
 import test_util
 
+import unittest
 
 class TestFetchSymlinks(test_util.TestBase):
     def _load_fixture_and_fetch(self, fixture_name, stupid):
--- a/tests/test_fetch_truncated.py
+++ b/tests/test_fetch_truncated.py
@@ -1,10 +1,10 @@
+import test_util
+
 import unittest
 
 from mercurial import commands
 from mercurial import hg
 
-import test_util
-
 class TestFetchTruncatedHistory(test_util.TestBase):
     def test_truncated_history(self, stupid=False):
         # Test repository does not follow the usual layout
--- a/tests/test_push_command.py
+++ b/tests/test_push_command.py
@@ -1,3 +1,5 @@
+import test_util
+
 import atexit
 import errno
 import os
@@ -14,7 +16,6 @@ from mercurial import node
 from mercurial import revlog
 from mercurial import util as hgutil
 
-import test_util
 import time
 
 
--- a/tests/test_push_dirs.py
+++ b/tests/test_push_dirs.py
@@ -1,7 +1,7 @@
-import unittest
-
 import test_util
 
+import unittest
+
 class TestPushDirectories(test_util.TestBase):
     def setUp(self):
         test_util.TestBase.setUp(self)
--- a/tests/test_push_eol.py
+++ b/tests/test_push_eol.py
@@ -1,7 +1,7 @@
-import unittest
-
 import test_util
 
+import unittest
+
 class TestPushEol(test_util.TestBase):
     def setUp(self):
         test_util.TestBase.setUp(self)
--- a/tests/test_push_renames.py
+++ b/tests/test_push_renames.py
@@ -1,8 +1,8 @@
+import test_util
+
 import sys
 import unittest
 
-import test_util
-
 class TestPushRenames(test_util.TestBase):
     def setUp(self):
         test_util.TestBase.setUp(self)
--- a/tests/test_rebuildmeta.py
+++ b/tests/test_rebuildmeta.py
@@ -1,9 +1,9 @@
+import test_util
+
 import os
 import pickle
 import unittest
 
-import test_util
-
 from mercurial import context
 from mercurial import extensions
 from mercurial import hg
--- a/tests/test_single_dir_clone.py
+++ b/tests/test_single_dir_clone.py
@@ -1,3 +1,5 @@
+import test_util
+
 import errno
 import shutil
 import unittest
@@ -8,9 +10,6 @@ from mercurial import hg
 from mercurial import node
 from mercurial import ui
 
-import test_util
-
-
 class TestSingleDir(test_util.TestBase):
     def test_clone_single_dir_simple(self):
         repo = self._load_fixture_and_fetch('branch_from_tag.svndump',
--- a/tests/test_svnwrap.py
+++ b/tests/test_svnwrap.py
@@ -1,3 +1,5 @@
+import test_util
+
 import imp
 import os
 import subprocess
@@ -5,8 +7,6 @@ import shutil
 import tempfile
 import unittest
 
-import test_util
-
 from hgsubversion import svnwrap
 
 import os
--- a/tests/test_tags.py
+++ b/tests/test_tags.py
@@ -1,3 +1,5 @@
+import test_util
+
 import os, sys, cStringIO, difflib
 import unittest
 
@@ -6,8 +8,6 @@ from mercurial import hg
 from mercurial import node
 from mercurial import ui
 
-import test_util
-
 from hgsubversion import svncommands
 from hgsubversion import svnrepo
 
--- a/tests/test_utility_commands.py
+++ b/tests/test_utility_commands.py
@@ -1,3 +1,5 @@
+import test_util
+
 import os
 import unittest
 
@@ -10,7 +12,6 @@ from mercurial import commands
 
 from hgsubversion import util
 from hgsubversion import svncommands
-import test_util
 from hgsubversion import wrappers
 
 expected_info_output = '''URL: %(repourl)s/%(branch)s