diff rhodecode/tests/vcs/__init__.py @ 3797:d7488551578e beta

synced vcs with upstream - moved subprocessio module to VCS - many small changes to make embedded vcs as similar to to external lib - use only absolute imports - patch vcs config during load pylons env
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 27 Apr 2013 11:24:25 +0200
parents 95624ce4465f
children 7e5f8c12a3fc
line wrap: on
line diff
--- a/rhodecode/tests/vcs/__init__.py	Sat Apr 27 11:45:27 2013 +0200
+++ b/rhodecode/tests/vcs/__init__.py	Sat Apr 27 11:24:25 2013 +0200
@@ -19,10 +19,10 @@
 .. _unittest: http://pypi.python.org/pypi/unittest
 
 """
-import os
-from rhodecode.lib import vcs
 from rhodecode.lib.vcs.utils.compat import unittest
-from utils import VCSTestError, SCMFetcher
+from rhodecode.tests.vcs.conf import *
+from rhodecode.tests.vcs.utils import VCSTestError, SCMFetcher
+
 from rhodecode.tests import *
 
 
@@ -36,7 +36,7 @@
             'alias': 'hg',
             'test_repo_path': TEST_HG_REPO,
             'remote_repo': HG_REMOTE_REPO,
-            'clone_cmd': 'hg clone',
+            'clone_cmd': 'hg clone --insecure',
         },
         'git': {
             'alias': 'git',
@@ -52,5 +52,16 @@
     except VCSTestError, err:
         raise RuntimeError(str(err))
 
-#start_dir = os.path.abspath(os.path.dirname(__file__))
-#unittest.defaultTestLoader.discover(start_dir)
+
+def collector():
+    setup_package()
+    start_dir = os.path.abspath(os.path.dirname(__file__))
+    return unittest.defaultTestLoader.discover(start_dir)
+
+
+def main():
+    collector()
+    unittest.main()
+
+#if __name__ == '__main__':
+#    main()