[Checkins] SVN: Zope3/branches/3.3/releases/Zope/ Undo r68020 when the tarball's test.py script was removed. Also made it

Philipp von Weitershausen philikon at philikon.de
Sun Aug 13 15:05:49 EDT 2006


Log message for revision 69447:
  Undo r68020 when the tarball's test.py script was removed.  Also made it
  use the new testrunner now.
  
  This addresses collector #602. The tests of the tarball don't pass for me, though
  (ZEO tests fail and hang). 
  

Changed:
  U   Zope3/branches/3.3/releases/Zope/PACKAGE.cfg
  A   Zope3/branches/3.3/releases/Zope/test.py

-=-
Modified: Zope3/branches/3.3/releases/Zope/PACKAGE.cfg
===================================================================
--- Zope3/branches/3.3/releases/Zope/PACKAGE.cfg	2006-08-13 19:01:27 UTC (rev 69446)
+++ Zope3/branches/3.3/releases/Zope/PACKAGE.cfg	2006-08-13 19:05:49 UTC (rev 69447)
@@ -11,4 +11,5 @@
   LICENSES.txt
   README.txt
   ZopePublicLicense.txt
+  test.py
 </distribution>

Copied: Zope3/branches/3.3/releases/Zope/test.py (from rev 68019, Zope3/trunk/releases/Zope/test.py)
===================================================================
--- Zope3/trunk/releases/Zope/test.py	2006-05-08 13:38:42 UTC (rev 68019)
+++ Zope3/branches/3.3/releases/Zope/test.py	2006-08-13 19:05:49 UTC (rev 69447)
@@ -0,0 +1,49 @@
+#!/usr/bin/env python2.4
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Test script for running unit tests in a distribution root.
+
+The functional tests can't be run since we don't have enough of the
+package configuration in a usable state.  The functional tests can be
+run from an installation.
+
+$Id$
+"""
+import sys, os, warnings, logging
+from distutils.util import get_platform
+
+# Insert build path
+PLAT_SPEC = "%s-%s" % (get_platform(), sys.version[0:3])
+here = os.path.dirname(os.path.realpath(__file__))
+lib = os.path.join(here, "build", "lib." + PLAT_SPEC)
+sys.path.insert(0, lib)
+# Remove this directory from path:
+here = os.path.abspath(os.path.dirname(sys.argv[0]))
+sys.path[:] = [p for p in sys.path if os.path.abspath(p) != here]
+
+from zope.testing import testrunner
+
+# Get rid of twisted.conch.ssh warning
+warnings.filterwarnings(
+    'ignore', 'PyCrypto', RuntimeWarning, 'twisted[.]conch[.]ssh')
+
+defaultargs = ['--tests-pattern', '^f?tests$', '--test-path', lib,
+               '--unit', '--verbose']
+result = testrunner.run(defaultargs)
+
+# Avoid spurious error during exit. Some thing is trying to log
+# something after the files used by the logger have been closed.
+logging.disable(999999999)
+
+sys.exit(result)



More information about the Checkins mailing list