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))
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")
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")
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)
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))
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")
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 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() # --------------------------------------------------------------------
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() # --------------------------------------------------------------------
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()
def inner_main(): import runtests runtests.main()
def run(self): from runtests import main return main()
#!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)