From 82546d776da812065d234fcd785db067dc374592 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 25 Aug 2011 00:21:53 -0700 Subject: [PATCH] Fix tests in Python3. --- testall.py | 4 ++-- tests/test_overall.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testall.py b/testall.py index 65c4a85..c9ad544 100755 --- a/testall.py +++ b/testall.py @@ -7,7 +7,7 @@ import unittest import distutils.core from glob import glob -from os.path import splitext, basename, join as pjoin, walk +from os.path import splitext, basename, join as pjoin def run_tests(): @@ -18,7 +18,7 @@ def run_tests(): """ testfiles = ['tests.test_overall'] exclude = ['__init__.py', 'test_overall.py'] - for t in glob(pjoin('.', 'tests', '*.py')): + for t in glob(pjoin('tests', '*.py')): if True not in [t.endswith(ex) for ex in exclude]: if basename(t).startswith('test_'): testfiles.append('tests.%s' % splitext(basename(t))[0]) diff --git a/tests/test_overall.py b/tests/test_overall.py index 4821f11..05fdc6d 100644 --- a/tests/test_overall.py +++ b/tests/test_overall.py @@ -14,7 +14,7 @@ class TestOverall(unittest.TestCase): def testModules(self): """Testing all modules by compiling them""" - src = '..%ssleekxmpp' % os.sep + src = '.%ssleekxmpp' % os.sep if sys.version_info < (3, 0): rx = re.compile('/[.]svn') else: