Mercurial > hgsubversion
changeset 426:72e63999722f
tests: make comprehensive tests work properly with nose and run.py
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 15 Jun 2009 12:26:20 -0500 |
parents | f5222d021665 |
children | 868693631372 |
files | tests/comprehensive/__init__.py tests/comprehensive/test_verify.py tests/run.py |
diffstat | 3 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
deleted file mode 100644 --- a/tests/comprehensive/__init__.py +++ /dev/null @@ -1,1 +0,0 @@ -# make this a package
--- a/tests/comprehensive/test_verify.py +++ b/tests/comprehensive/test_verify.py @@ -2,7 +2,12 @@ import os import pickle import unittest -import test_util +# wrapped in a try/except because of weirdness in how +# run.py works as compared to nose. +try: + import test_util +except ImportError: + from tests import test_util from mercurial import hg from mercurial import ui
--- a/tests/run.py +++ b/tests/run.py @@ -25,8 +25,10 @@ import test_tags import test_utility_commands import test_urls -from comprehensive import test_stupid_pull -from comprehensive import test_verify +sys.path.append(os.path.join(os.path.dirname(__file__), 'comprehensive')) + +import test_stupid_pull +import test_verify def comprehensive(mod): dir = os.path.basename(os.path.dirname(mod.__file__))