changeset 766:124cd25de4ef

tests: fix running the comprehensive tests using nose.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Mon, 29 Nov 2010 11:53:57 +0100
parents 62c9e6bd2ca7
children 6c244d3ceaf7
files tests/comprehensive/test_stupid_pull.py tests/comprehensive/test_verify.py
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/comprehensive/test_stupid_pull.py
+++ b/tests/comprehensive/test_stupid_pull.py
@@ -1,5 +1,6 @@
 import os
 import pickle
+import sys
 import unittest
 
 from mercurial import hg
@@ -10,7 +11,8 @@ from mercurial import ui
 try:
     import test_util
 except ImportError:
-    from tests import test_util
+    sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
+    import test_util
 
 from hgsubversion import wrappers
 
--- a/tests/comprehensive/test_verify.py
+++ b/tests/comprehensive/test_verify.py
@@ -1,5 +1,6 @@
 import os
 import pickle
+import sys
 import unittest
 
 # wrapped in a try/except because of weirdness in how
@@ -7,7 +8,8 @@ import unittest
 try:
     import test_util
 except ImportError:
-    from tests import test_util
+    sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
+    import test_util
 
 from mercurial import hg
 from mercurial import ui