mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 11:09:56 +00:00
Fix tests in Python3.
This commit is contained in:
parent
84f9505a8d
commit
82546d776d
2 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ import unittest
|
||||||
import distutils.core
|
import distutils.core
|
||||||
|
|
||||||
from glob import glob
|
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():
|
def run_tests():
|
||||||
|
@ -18,7 +18,7 @@ def run_tests():
|
||||||
"""
|
"""
|
||||||
testfiles = ['tests.test_overall']
|
testfiles = ['tests.test_overall']
|
||||||
exclude = ['__init__.py', 'test_overall.py']
|
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 True not in [t.endswith(ex) for ex in exclude]:
|
||||||
if basename(t).startswith('test_'):
|
if basename(t).startswith('test_'):
|
||||||
testfiles.append('tests.%s' % splitext(basename(t))[0])
|
testfiles.append('tests.%s' % splitext(basename(t))[0])
|
||||||
|
|
|
@ -14,7 +14,7 @@ class TestOverall(unittest.TestCase):
|
||||||
|
|
||||||
def testModules(self):
|
def testModules(self):
|
||||||
"""Testing all modules by compiling them"""
|
"""Testing all modules by compiling them"""
|
||||||
src = '..%ssleekxmpp' % os.sep
|
src = '.%ssleekxmpp' % os.sep
|
||||||
if sys.version_info < (3, 0):
|
if sys.version_info < (3, 0):
|
||||||
rx = re.compile('/[.]svn')
|
rx = re.compile('/[.]svn')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue