[Checkins] SVN: zope.app.applicationcontrol/trunk/ Make the test for the ZopeVersion bugfix in 3.4.2 not fail when run from an

Marius Gedminas marius at pov.lt
Wed Jul 30 14:27:04 EDT 2008


Log message for revision 89057:
  Make the test for the ZopeVersion bugfix in 3.4.2 not fail when run from an
  egg rather than a checkout.
  
  

Changed:
  U   zope.app.applicationcontrol/trunk/CHANGES.txt
  U   zope.app.applicationcontrol/trunk/src/zope/app/applicationcontrol/tests/test_zopeversion.py

-=-
Modified: zope.app.applicationcontrol/trunk/CHANGES.txt
===================================================================
--- zope.app.applicationcontrol/trunk/CHANGES.txt	2008-07-30 18:02:16 UTC (rev 89056)
+++ zope.app.applicationcontrol/trunk/CHANGES.txt	2008-07-30 18:27:03 UTC (rev 89057)
@@ -5,6 +5,9 @@
 Version 3.4.3 (unreleased)
 --------------------------
 
+- Make the test for the ZopeVersion bugfix in 3.4.2 not fail when run from an
+  egg rather than a checkout.
+
 Version 3.4.2 (2008-07-30)
 --------------------------
 

Modified: zope.app.applicationcontrol/trunk/src/zope/app/applicationcontrol/tests/test_zopeversion.py
===================================================================
--- zope.app.applicationcontrol/trunk/src/zope/app/applicationcontrol/tests/test_zopeversion.py	2008-07-30 18:02:16 UTC (rev 89056)
+++ zope.app.applicationcontrol/trunk/src/zope/app/applicationcontrol/tests/test_zopeversion.py	2008-07-30 18:27:03 UTC (rev 89057)
@@ -34,6 +34,11 @@
     else:
         return proc.wait() == 0
 
+
+def isSVNCheckout(dir):
+    return os.path.isdir(os.path.join(dir, '.svn'))
+
+
 class MockZopeVersion(ZopeVersion):
 
     def setSVNInfoOutput(self, lines):
@@ -123,8 +128,8 @@
 
     def test_WrongLocale(self):
         """Demonstrate bug 177733"""
-        if isSVNAvailable():
-            currentPath = os.path.dirname(os.path.abspath(__file__))
+        currentPath = os.path.dirname(os.path.abspath(__file__))
+        if isSVNAvailable() and isSVNCheckout(currentPath):
             zv = ZopeVersion(currentPath)
             zv.getZopeVersion()
             # check that we don't get a 'Development/Unknown' version



More information about the Checkins mailing list