コード例 #1
0
    path, script = os.path.split(sys.argv[0])
    suite = package_unittest.loadTestModules(DocutilsTestSupport.testroot,
                                             'test_',
                                             packages=1)
    sys.stdout.flush()
    return suite


# must redirect stderr *before* first import of unittest
sys.stdout = sys.stderr = Tee('alltests.out')

import package_unittest

if __name__ == '__main__':
    suite = suite()
    print(('Testing Docutils %s with Python %s on %s at %s' %
           (docutils.__version__, sys.version.split()[0],
            time.strftime('%Y-%m-%d'), time.strftime('%H:%M:%S'))))
    print(('OS: %s %s %s (%s, %s)' %
           (platform.system(), platform.release(), platform.version(),
            sys.platform, platform.platform())))
    print('Working directory: %s' % os.getcwd())
    print('Docutils package: %s' % os.path.dirname(docutils.__file__))
    sys.stdout.flush()
    result = package_unittest.main(suite)
    #if package_unittest.verbosity > 1:
    #    print >>sys.stderr, pformat(suite) # check the test suite
    finish = time.time()
    print('Elapsed time: %.3f seconds' % (finish - start))
    sys.exit(not result.wasSuccessful())
コード例 #2
0
ファイル: alltests.py プロジェクト: alon/polinax
                indent -= step
    return '\n'.join(output)

def suite():
    path, script = os.path.split(sys.argv[0])
    suite = package_unittest.loadTestModules(DocutilsTestSupport.testroot,
                                             'test_', packages=1)
    sys.stdout.flush()
    return suite

# must redirect stderr *before* first import of unittest
sys.stdout = sys.stderr = Tee('alltests.out')

import package_unittest


if __name__ == '__main__':
    suite = suite()
    print ('Testing Docutils %s [%s] with Python %s on %s at %s'
           % (docutils.__version__, docutils.__version_details__,
              sys.version.split()[0],
              time.strftime('%Y-%m-%d'), time.strftime('%H:%M:%S')))
    print 'Working directory: %s' % os.getcwd()
    print 'Docutils package: %s' % os.path.dirname(docutils.__file__)
    sys.stdout.flush()
    package_unittest.main(suite)
    #if package_unittest.verbosity > 1:
    #    print >>sys.stderr, pformat(suite) # check the test suite
    finish = time.time()
    print 'Elapsed time: %.3f seconds' % (finish - start)
コード例 #3
0
    return '\n'.join(output)

def suite():
    path, script = os.path.split(sys.argv[0])
    suite = package_unittest.loadTestModules(DocutilsTestSupport.testroot,
                                             'test_', packages=1)
    sys.stdout.flush()
    return suite

# must redirect stderr *before* first import of unittest
sys.stdout = sys.stderr = Tee('alltests.out')

import package_unittest


if __name__ == '__main__':
    suite = suite()
    print ('Testing Docutils %s [%s] with Python %s on %s at %s'
           % (docutils.__version__, docutils.__version_details__,
              sys.version.split()[0],
              time.strftime('%Y-%m-%d'), time.strftime('%H:%M:%S')))
    print 'Working directory: %s' % os.getcwd()
    print 'Docutils package: %s' % os.path.dirname(docutils.__file__)
    sys.stdout.flush()
    result = package_unittest.main(suite)
    #if package_unittest.verbosity > 1:
    #    print >>sys.stderr, pformat(suite) # check the test suite
    finish = time.time()
    print 'Elapsed time: %.3f seconds' % (finish - start)
    sys.exit(not result.wasSuccessful())
コード例 #4
0

def suite():
    path, script = os.path.split(sys.argv[0])
    suite = package_unittest.loadTestModules(DocutilsTestSupport.testroot,
                                             'test_',
                                             packages=1)
    sys.stdout.flush()
    return suite


# must redirect stderr *before* first import of unittest
sys.stdout = sys.stderr = Tee('alltests.out')

import package_unittest

if __name__ == '__main__':
    suite = suite()
    print('Testing Docutils %s [%s] with Python %s on %s at %s' %
          (docutils.__version__, docutils.__version_details__,
           sys.version.split()[0], time.strftime('%Y-%m-%d'),
           time.strftime('%H:%M:%S')))
    print 'Working directory: %s' % os.getcwd()
    print 'Docutils package: %s' % os.path.dirname(docutils.__file__)
    sys.stdout.flush()
    package_unittest.main(suite)
    #if package_unittest.verbosity > 1:
    #    print >>sys.stderr, pformat(suite) # check the test suite
    finish = time.time()
    print 'Elapsed time: %.3f seconds' % (finish - start)