[Checkins] SVN: five.localsitemanager/trunk/src/five/localsitemanager/tests.py Added a zope2 hack so that an empty test suite is returned if localsitemanager was mangled into sys.path.

Rocky Burt rocky at serverzen.com
Thu Feb 22 18:26:35 EST 2007


Log message for revision 72776:
  Added a zope2 hack so that an empty test suite is returned if localsitemanager was mangled into sys.path.

Changed:
  U   five.localsitemanager/trunk/src/five/localsitemanager/tests.py

-=-
Modified: five.localsitemanager/trunk/src/five/localsitemanager/tests.py
===================================================================
--- five.localsitemanager/trunk/src/five/localsitemanager/tests.py	2007-02-22 23:11:15 UTC (rev 72775)
+++ five.localsitemanager/trunk/src/five/localsitemanager/tests.py	2007-02-22 23:26:34 UTC (rev 72776)
@@ -3,6 +3,11 @@
 from Testing.ZopeTestCase import FunctionalDocFileSuite
 
 def test_suite():
+    if __name__ not in ('five.localsitemanager', '__main__'):
+        # a safety net for when five.localsitemanager is manged into sys.path
+        # of a zope2 product
+        return unittest.TestSuite()
+
     return unittest.TestSuite([
         ZopeDocFileSuite('localsitemanager.txt',
                          package="five.localsitemanager"),



More information about the Checkins mailing list