Beispiel #1
0
def makeTestSuite():
    import __main__
    topdir = dirname(__main__.__file__)
    if sys.version_info[0] == 3:
        del sys.path[1]
        deja_topdir = dirname(dirname(topdir))
    else:
        deja_topdir = topdir
    deja_suite = dejagnu.testSuiteForDirectory(
        join(deja_topdir, 'libffi-src/tests/testsuite/libffi.call'))

    plain_suite = importExternalTestCases("test_*.py",
                                          join(topdir, 'PyObjCTest'),
                                          package='PyObjCTest')

    version_suite = importExternalTestCases("test%d_*.py" %
                                            (sys.version_info[0], ),
                                            join(topdir, 'PyObjCTest'),
                                            package='PyObjCTest')

    suite = unittest.TestSuite((plain_suite, version_suite, deja_suite))

    # the libffi tests don't work unless we use our own
    # copy of libffi.
    import __main__
    if __main__.USE_SYSTEM_FFI:
        return unittest.TestSuite((plain_suite, version_suite))
    return suite
Beispiel #2
0
def makeTestSuite():
    import __main__
    topdir = dirname(__main__.__file__)
    if sys.version_info[0] == 3:
        del sys.path[1]
        deja_topdir = dirname(dirname(topdir))
    else:
        deja_topdir = topdir
    deja_suite = dejagnu.testSuiteForDirectory(join(deja_topdir,
        'libffi-src/tests/testsuite/libffi.call'))

    plain_suite = importExternalTestCases("test_*.py",
        join(topdir, 'PyObjCTest'), package='PyObjCTest')

    version_suite = importExternalTestCases("test%d_*.py"%(sys.version_info[0],),
        join(topdir, 'PyObjCTest'), package='PyObjCTest')
        
    suite = unittest.TestSuite((plain_suite, version_suite, deja_suite))

    # the libffi tests don't work unless we use our own
    # copy of libffi.
    import __main__
    if __main__.USE_SYSTEM_FFI:
        return unittest.TestSuite((plain_suite, version_suite))
    return suite
Beispiel #3
0
def makeTestSuite():
    topdir = dirname(dirname(__file__))
    deja_suite = dejagnu.testSuiteForDirectory(join(topdir,
        'libffi-src/tests/testsuite/libffi.call'))

    plain_suite = importExternalTestCases("test_*.py",
        join(topdir, 'PyObjCTest'), package='PyObjCTest')
        
    suite = unittest.TestSuite((plain_suite, deja_suite))

    # the libffi tests don't work unless we use our own
    # copy of libffi.
    import __main__
    if __main__.USE_SYSTEM_FFI:
        return plain_suite
    return suite
Beispiel #4
0
def makeTestSuite():
    topdir = dirname(dirname(__file__))
    deja_suite = dejagnu.testSuiteForDirectory(
        join(topdir, 'libffi-src/tests/testsuite/libffi.call'))

    plain_suite = importExternalTestCases("test_*.py",
                                          join(topdir, 'PyObjCTest'),
                                          package='PyObjCTest')

    suite = unittest.TestSuite((plain_suite, deja_suite))

    # the libffi tests don't work unless we use our own
    # copy of libffi.
    import __main__
    if __main__.USE_SYSTEM_FFI:
        return plain_suite
    return suite
Beispiel #5
0
"""
'test' action for setup.py
"""
# XXX - use setuptools test suite support
import sys, os, string, glob
from os.path import basename, dirname, splitext, join, expanduser, walk
from fnmatch import fnmatch
import unittest
import dejagnu

deja_suite = dejagnu.testSuiteForDirectory('tests/testsuite/libffi.call')
suite = unittest.TestSuite((deja_suite, ))
runner = unittest.TextTestRunner(verbosity=1)
runner.run(suite)