コード例 #1
0
def main():
    dirname = os.path.split(__file__)
    sys.path.append(dirname)

    gc.set_debug(gc.DEBUG_LEAK)

    start = time.clock()

    for i in range(50):
        print('iteration: {0:d}'.format(i))
        runtests.main()

    stop = time.clock()
    took = str(stop - start)
    print('Total Time: {0}'.format(took))

    for item in gc.get_objects():
        print(item, sys.getrefcount(item))
コード例 #2
0
ファイル: profile.py プロジェクト: brudo/pythonnet-1
def main():
    dirname = os.path.split(__file__)
    sys.path.append(dirname)

    gc.set_debug(gc.DEBUG_LEAK)

    start = time.clock()

    for i in range(50):
        print('iteration: {0:d}'.format(i))
        runtests.main()

    stop = time.clock()
    took = str(stop - start)
    print('Total Time: {0}'.format(took))

    for item in gc.get_objects():
        print(item, sys.getrefcount(item))
コード例 #3
0
ファイル: buildsite.py プロジェクト: mpsaloha/schemaorg
def runtests():
    import runtests
    if args.runtests or args.autobuild:
        print("Running test scripts before proceeding...\n")
        errorcount = runtests.main('./tests/')
        if errorcount:
            print("Errors returned: %d" % errorcount)
            sys.exit(errorcount)
        else:
            print("Tests succesful!\n")
コード例 #4
0
def run_testsuite(cmd):
    from distutils.errors import DistutilsError
    sys.path.insert(0, 'test')
    try:
        from runtests import main
    finally:
        del sys.path[0]
    err = main(cmd.args or [])
    if err:
        raise DistutilsError("test")
コード例 #5
0
ファイル: setup.py プロジェクト: cstausland/ppde_chris
def run_testsuite(cmd):
    from distutils.errors import DistutilsError
    sys.path.insert(0, 'test')
    try:
        from runtests import main
    finally:
        del sys.path[0]
    err = main(cmd.args or [])
    if err:
        raise DistutilsError("test")
コード例 #6
0
def main():
    import sys, os, gc, time

    dirname = os.path.split(__file__)
    sys.path.append(dirname)
    import runtests

    gc.set_debug(gc.DEBUG_LEAK)

    start = time.clock()

    for i in range(50):
        print 'iteration: %d' % i
        runtests.main()

    stop = time.clock()
    took = str(stop - start)
    print 'Total Time: %s' % took

    for item in gc.get_objects():
        print item, sys.getrefcount(item)
コード例 #7
0
ファイル: profile.py プロジェクト: bonashen/pythonnet
def main():
    import sys, os, gc, time

    dirname = os.path.split(__file__)
    sys.path.append(dirname)
    import runtests

    gc.set_debug(gc.DEBUG_LEAK)

    start = time.clock()

    for i in range(50):
        print('iteration: %d' % i)
        runtests.main()

    stop = time.clock()
    took = str(stop - start)
    print('Total Time: %s' % took)

    for item in gc.get_objects():
        print(item, sys.getrefcount(item))
コード例 #8
0
ファイル: setup.py プロジェクト: xqding/mpi4py
def run_testsuite(cmd):
    from distutils.errors import DistutilsError
    sys.path.insert(0, 'test')
    try:
        from runtests import main
    finally:
        del sys.path[0]
    if cmd.dry_run:
        return
    args = cmd.args[:] or []
    if cmd.verbose < 1:
        args.insert(0, '-q')
    if cmd.verbose > 1:
        args.insert(0, '-v')
    err = main(args)
    if err:
        raise DistutilsError("test")
コード例 #9
0
ファイル: setup.py プロジェクト: pressel/mpi4py
def run_testsuite(cmd):
    from distutils.errors import DistutilsError
    sys.path.insert(0, 'test')
    try:
        from runtests import main
    finally:
        del sys.path[0]
    if cmd.dry_run:
        return
    args = cmd.args[:] or []
    if cmd.verbose < 1:
        args.insert(0,'-q')
    if cmd.verbose > 1:
        args.insert(0,'-v')
    err = main(args)
    if err:
        raise DistutilsError("test")
コード例 #10
0
ファイル: setup.py プロジェクト: xqding/mpi4py
    from distutils.errors import DistutilsError
    sys.path.insert(0, 'test')
    try:
        from runtests import main
    finally:
        del sys.path[0]
    if cmd.dry_run:
        return
    args = cmd.args[:] or []
    if cmd.verbose < 1:
        args.insert(0, '-q')
    if cmd.verbose > 1:
        args.insert(0, '-v')
    err = main(args)
    if err:
        raise DistutilsError("test")


from mpidistutils import test
test.run = run_testsuite


def main():
    run_setup()


if __name__ == '__main__':
    main()

# --------------------------------------------------------------------
コード例 #11
0
ファイル: setup.py プロジェクト: pressel/mpi4py
build_src.run = build_sources

def run_testsuite(cmd):
    from distutils.errors import DistutilsError
    sys.path.insert(0, 'test')
    try:
        from runtests import main
    finally:
        del sys.path[0]
    if cmd.dry_run:
        return
    args = cmd.args[:] or []
    if cmd.verbose < 1:
        args.insert(0,'-q')
    if cmd.verbose > 1:
        args.insert(0,'-v')
    err = main(args)
    if err:
        raise DistutilsError("test")

from mpidistutils import test
test.run = run_testsuite

def main():
    run_setup()

if __name__ == '__main__':
    main()

# --------------------------------------------------------------------
コード例 #12
0
              NumericOutStreamTest,
              helper=OctetTestHelper())
register_test('OutShortStreamTest',
              NumericOutStreamTest,
              helper=ShortTestHelper())
register_test('OutUShortStreamTest',
              NumericOutStreamTest,
              helper=UShortTestHelper())
register_test('OutLongStreamTest',
              NumericOutStreamTest,
              helper=LongTestHelper())
register_test('OutULongStreamTest',
              NumericOutStreamTest,
              helper=ULongTestHelper())
register_test('OutLongLongStreamTest',
              NumericOutStreamTest,
              helper=LongLongTestHelper())
register_test('OutULongLongStreamTest',
              NumericOutStreamTest,
              helper=ULongLongTestHelper())
register_test('OutFloatStreamTest',
              NumericOutStreamTest,
              helper=FloatTestHelper())
register_test('OutDoubleStreamTest',
              NumericOutStreamTest,
              helper=DoubleTestHelper())

if __name__ == '__main__':
    import runtests
    runtests.main()
コード例 #13
0
ファイル: coverage.py プロジェクト: o11c/llpy
def inner_main():
    import runtests
    runtests.main()
コード例 #14
0
    def run(self):
        from runtests import main

        return main()
コード例 #15
0
#!python

from glob import glob
import os
import os.path

source = []

for name, dirs, files in os.walk("."):
    source.extend([os.path.join(name, file) for file in files if file.endswith(".py")])

import coverage

coverage.erase()

import runtests

coverage.start()
runtests.main()
coverage.stop()

coverage.report(source)