[Checkins] SVN: zope.app.applicationcontrol/tags/3.4.3/ Release
3.4.3
Marius Gedminas
marius at pov.lt
Wed Jul 30 14:32:00 EDT 2008
Log message for revision 89059:
Release 3.4.3
Changed:
A zope.app.applicationcontrol/tags/3.4.3/
D zope.app.applicationcontrol/tags/3.4.3/CHANGES.txt
A zope.app.applicationcontrol/tags/3.4.3/CHANGES.txt
D zope.app.applicationcontrol/tags/3.4.3/INSTALL.txt
A zope.app.applicationcontrol/tags/3.4.3/INSTALL.txt
D zope.app.applicationcontrol/tags/3.4.3/README.txt
A zope.app.applicationcontrol/tags/3.4.3/README.txt
D zope.app.applicationcontrol/tags/3.4.3/setup.py
A zope.app.applicationcontrol/tags/3.4.3/setup.py
D zope.app.applicationcontrol/tags/3.4.3/src/zope/app/applicationcontrol/tests/test_zopeversion.py
A zope.app.applicationcontrol/tags/3.4.3/src/zope/app/applicationcontrol/tests/test_zopeversion.py
-=-
Copied: zope.app.applicationcontrol/tags/3.4.3 (from rev 89027, zope.app.applicationcontrol/trunk)
Deleted: zope.app.applicationcontrol/tags/3.4.3/CHANGES.txt
===================================================================
--- zope.app.applicationcontrol/trunk/CHANGES.txt 2008-07-30 16:31:35 UTC (rev 89027)
+++ zope.app.applicationcontrol/tags/3.4.3/CHANGES.txt 2008-07-30 18:31:59 UTC (rev 89059)
@@ -1,21 +0,0 @@
-=======
-CHANGES
-=======
-
-Version 3.4.2 (unreleased)
---------------------------
-
-- Fixed deprecation warning in ftesting.zcml: import ZopeSecurityPolicy from
- the new location.
-
-Version 3.4.1 (2007-09-27)
---------------------------
-
-- rebumped to replace faulty egg
-
-Version 3.4.0 (2007-09-25)
---------------------------
-
-- Initial documented release
-
-- Reflect changes form zope.app.error refactoring
Copied: zope.app.applicationcontrol/tags/3.4.3/CHANGES.txt (from rev 89058, zope.app.applicationcontrol/trunk/CHANGES.txt)
===================================================================
--- zope.app.applicationcontrol/tags/3.4.3/CHANGES.txt (rev 0)
+++ zope.app.applicationcontrol/tags/3.4.3/CHANGES.txt 2008-07-30 18:31:59 UTC (rev 89059)
@@ -0,0 +1,34 @@
+=======
+CHANGES
+=======
+
+Version 3.4.3 (2008-07-30)
+--------------------------
+
+- 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)
+--------------------------
+
+- Substitute zope.app.zapi by direct calls to its wrapped apis.
+ See http://launchpad.net/bugs/219302
+
+- Bugfix: ZopeVersion used to report an unknown version when running on a
+ machine with a locale different than English.
+ See http://launchpad.net/bugs/177733
+
+- Fixed deprecation warning in ftesting.zcml: import ZopeSecurityPolicy from
+ the new location.
+
+Version 3.4.1 (2007-09-27)
+--------------------------
+
+- rebumped to replace faulty egg
+
+Version 3.4.0 (2007-09-25)
+--------------------------
+
+- Initial documented release
+
+- Reflect changes form zope.app.error refactoring
Deleted: zope.app.applicationcontrol/tags/3.4.3/INSTALL.txt
===================================================================
--- zope.app.applicationcontrol/trunk/INSTALL.txt 2008-07-30 16:31:35 UTC (rev 89027)
+++ zope.app.applicationcontrol/tags/3.4.3/INSTALL.txt 2008-07-30 18:31:59 UTC (rev 89059)
@@ -1,81 +0,0 @@
-=======================
-Installing This Package
-=======================
-
-Prerequisites
--------------
-
-The installation steps below assume that you have the cool new 'setuptools'
-package installed in your Python. Here is where to get it:
-
- $ wget http://peak.telecommunity.com/dist/ez_setup.py
- $ /path/to/your/python ez_setup.py # req. write access to 'site-packages'
-
- - Docs for EasyInstall:
- http://peak.telecommunity.com/DevCenter/EasyInstall
-
- - Docs for setuptools:
- http://peak.telecommunity.com/DevCenter/setuptools
-
- - Docs for eggs:
- http://peak.telecommunity.com/DevCenter/PythonEggs
-
-
-Installing a Development Checkout
----------------------------------
-
-Check out the package from subversion:
-
- $ svn co svn+ssh://svn.zope.org/repos/main/zope.app.applicationcontrol/trunk \
- src/zope.app.applicationcontrol
- $ cd src/zope.app.applicationcontrol
-
-Install it as a "devlopment egg" (which also installs its "hard"
-dependencies):
-
- $ /path/to/your/python setup.py devel
-
-The installation of dependency eggs uses the 'setup.cfg' file in
-the checkout. You can supply '--find-links' on the command line to
-point it at a non-standard package repository.
-
-
-Running the Tests
------------------
-
-To test the package, you will also need the 'zope.testing' package, which
-can't (yet) be automatically installed. Eventually, you should be able to
-type:
-
- $ /path/to/your/python setup.py test
-
-and have it install the "testing dependencies." Today, the workaround
-is to install it manually:
-
- $ /path/to/easy_install --find-links="...." zope.testing
-
-You can then run the tests (finally) from the checkout directory:
-
- $ /path/to/your/python test.py
- Running:
- .............
- Ran 13 tests with 0 failures and 0 errors in 0.094 seconds.
-
-
-Installing a Source Distribution
---------------------------------
-
-You can also install it from a source distribution:
-
- $ /path/to/easy_install --find-links="...." -eb src zope.app.applicationcontrol
- $ cd src/zope.app.applicationcontrol
- $ /path/to/your/python setup.py devel
-
-
-Installing a Binary Egg
------------------------
-
-Install the package as a "binary egg" (which also installs its "hard"
-dependencies):
-
- $ /path/to/easy_install --find-links="...." zope.app.applicationcontrol
Copied: zope.app.applicationcontrol/tags/3.4.3/INSTALL.txt (from rev 89048, zope.app.applicationcontrol/trunk/INSTALL.txt)
===================================================================
--- zope.app.applicationcontrol/tags/3.4.3/INSTALL.txt (rev 0)
+++ zope.app.applicationcontrol/tags/3.4.3/INSTALL.txt 2008-07-30 18:31:59 UTC (rev 89059)
@@ -0,0 +1,81 @@
+=======================
+Installing This Package
+=======================
+
+Prerequisites
+-------------
+
+The installation steps below assume that you have the cool new 'setuptools'
+package installed in your Python. Here is where to get it::
+
+ $ wget http://peak.telecommunity.com/dist/ez_setup.py
+ $ /path/to/your/python ez_setup.py # req. write access to 'site-packages'
+
+- Docs for EasyInstall:
+ http://peak.telecommunity.com/DevCenter/EasyInstall
+
+- Docs for setuptools:
+ http://peak.telecommunity.com/DevCenter/setuptools
+
+- Docs for eggs:
+ http://peak.telecommunity.com/DevCenter/PythonEggs
+
+
+Installing a Development Checkout
+---------------------------------
+
+Check out the package from subversion::
+
+ $ svn co svn+ssh://svn.zope.org/repos/main/zope.app.applicationcontrol/trunk \
+ src/zope.app.applicationcontrol
+ $ cd src/zope.app.applicationcontrol
+
+Install it as a "devlopment egg" (which also installs its "hard"
+dependencies)::
+
+ $ /path/to/your/python setup.py devel
+
+The installation of dependency eggs uses the 'setup.cfg' file in
+the checkout. You can supply '--find-links' on the command line to
+point it at a non-standard package repository.
+
+
+Running the Tests
+-----------------
+
+To test the package, you will also need the 'zope.testing' package, which
+can't (yet) be automatically installed. Eventually, you should be able to
+type::
+
+ $ /path/to/your/python setup.py test
+
+and have it install the "testing dependencies." Today, the workaround
+is to install it manually::
+
+ $ /path/to/easy_install --find-links="...." zope.testing
+
+You can then run the tests (finally) from the checkout directory::
+
+ $ /path/to/your/python test.py
+ Running:
+ .............
+ Ran 13 tests with 0 failures and 0 errors in 0.094 seconds.
+
+
+Installing a Source Distribution
+--------------------------------
+
+You can also install it from a source distribution::
+
+ $ /path/to/easy_install --find-links="...." -eb src zope.app.applicationcontrol
+ $ cd src/zope.app.applicationcontrol
+ $ /path/to/your/python setup.py devel
+
+
+Installing a Binary Egg
+-----------------------
+
+Install the package as a "binary egg" (which also installs its "hard"
+dependencies)::
+
+ $ /path/to/easy_install --find-links="...." zope.app.applicationcontrol
Deleted: zope.app.applicationcontrol/tags/3.4.3/README.txt
===================================================================
--- zope.app.applicationcontrol/trunk/README.txt 2008-07-30 16:31:35 UTC (rev 89027)
+++ zope.app.applicationcontrol/tags/3.4.3/README.txt 2008-07-30 18:31:59 UTC (rev 89059)
@@ -1,21 +0,0 @@
-The application control instance is usually generated upon startup.
-This package provides runtime information adapter for application
-control and Zope version. Also provide a utility with methods for
-shutting down and restarting the server.
-
-
-Developer Resources
--------------------
-
-- Subversion browser:
-
- http://svn.zope.org/zope.app.applicationcontrol/
-
-- Read-only Subversion checkout:
-
- $ svn co svn://svn.zope.org/repos/main/zope.app.applicationcontrol/trunk
-
-- Writable Subversion checkout:
-
- $ svn co svn+ssh://userid@svn.zope.org/repos/main/zope.app.applicationcontrol/trunk
-
Copied: zope.app.applicationcontrol/tags/3.4.3/README.txt (from rev 89048, zope.app.applicationcontrol/trunk/README.txt)
===================================================================
--- zope.app.applicationcontrol/tags/3.4.3/README.txt (rev 0)
+++ zope.app.applicationcontrol/tags/3.4.3/README.txt 2008-07-30 18:31:59 UTC (rev 89059)
@@ -0,0 +1,25 @@
+===========================
+zope.app.applicationcontrol
+===========================
+
+The application control instance is usually generated upon startup.
+This package provides runtime information adapter for application
+control and Zope version. Also provide a utility with methods for
+shutting down and restarting the server.
+
+
+Developer Resources
+-------------------
+
+- Subversion browser:
+
+ http://svn.zope.org/zope.app.applicationcontrol/
+
+- Read-only Subversion checkout::
+
+ $ svn co svn://svn.zope.org/repos/main/zope.app.applicationcontrol/trunk
+
+- Writable Subversion checkout::
+
+ $ svn co svn+ssh://userid@svn.zope.org/repos/main/zope.app.applicationcontrol/trunk
+
Deleted: zope.app.applicationcontrol/tags/3.4.3/setup.py
===================================================================
--- zope.app.applicationcontrol/trunk/setup.py 2008-07-30 16:31:35 UTC (rev 89027)
+++ zope.app.applicationcontrol/tags/3.4.3/setup.py 2008-07-30 18:31:59 UTC (rev 89059)
@@ -1,63 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 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.
-#
-##############################################################################
-"""Setup for zope.app.applicationcontrol package
-
-$Id$
-"""
-
-import os
-
-from setuptools import setup, find_packages
-
-def read(*rnames):
- return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-
-setup(name='zope.app.applicationcontrol',
- version = '3.4.2dev',
- author='Zope Corporation and Contributors',
- author_email='zope3-dev at zope.org',
- description='Zope applicationcontrol',
- long_description=(
- read('README.txt')
- + '\n\n' +
- read('INSTALL.txt')
- + '\n\n' +
- read('CHANGES.txt')
- ),
- license='ZPL 2.1',
- keywords = "zope3 application control",
- classifiers = [
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: Zope Public License',
- 'Programming Language :: Python',
- 'Natural Language :: English',
- 'Operating System :: OS Independent',
- 'Topic :: Internet :: WWW/HTTP',
- 'Framework :: Zope3'],
- url='http://cheeseshop.python.org/pypi/zope.app.applicationcontrol',
- extras_require=dict(
- test=['zope.app.testing']),
- package_dir = {'': 'src'},
- packages=find_packages('src'),
- namespace_packages=['zope', 'zope.app'],
- install_requires=['setuptools',
- 'zope.error',
- 'zope.interface',
- 'zope.i18n',
- 'zope.size',],
- include_package_data = True,
- zip_safe = False,
- )
Copied: zope.app.applicationcontrol/tags/3.4.3/setup.py (from rev 89058, zope.app.applicationcontrol/trunk/setup.py)
===================================================================
--- zope.app.applicationcontrol/tags/3.4.3/setup.py (rev 0)
+++ zope.app.applicationcontrol/tags/3.4.3/setup.py 2008-07-30 18:31:59 UTC (rev 89059)
@@ -0,0 +1,63 @@
+##############################################################################
+#
+# Copyright (c) 2006 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.
+#
+##############################################################################
+"""Setup for zope.app.applicationcontrol package
+
+$Id$
+"""
+
+import os
+
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+setup(name='zope.app.applicationcontrol',
+ version = '3.4.3',
+ author='Zope Corporation and Contributors',
+ author_email='zope3-dev at zope.org',
+ description='Zope applicationcontrol',
+ long_description=(
+ read('README.txt')
+ + '\n\n' +
+ read('INSTALL.txt')
+ + '\n\n' +
+ read('CHANGES.txt')
+ ),
+ license='ZPL 2.1',
+ keywords = "zope3 application control",
+ classifiers = [
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Programming Language :: Python',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Framework :: Zope3'],
+ url='http://cheeseshop.python.org/pypi/zope.app.applicationcontrol',
+ extras_require=dict(
+ test=['zope.app.testing']),
+ package_dir = {'': 'src'},
+ packages=find_packages('src'),
+ namespace_packages=['zope', 'zope.app'],
+ install_requires=['setuptools',
+ 'zope.error',
+ 'zope.interface',
+ 'zope.i18n',
+ 'zope.size',],
+ include_package_data = True,
+ zip_safe = False,
+ )
Deleted: zope.app.applicationcontrol/tags/3.4.3/src/zope/app/applicationcontrol/tests/test_zopeversion.py
===================================================================
--- zope.app.applicationcontrol/trunk/src/zope/app/applicationcontrol/tests/test_zopeversion.py 2008-07-30 16:31:35 UTC (rev 89027)
+++ zope.app.applicationcontrol/tags/3.4.3/src/zope/app/applicationcontrol/tests/test_zopeversion.py 2008-07-30 18:31:59 UTC (rev 89059)
@@ -1,137 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001, 2002 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.
-#
-##############################################################################
-"""Zope Version Tests
-
-$Id$
-"""
-import os
-import shutil
-import subprocess
-import tempfile
-import unittest
-
-from zope.interface.verify import verifyObject
-from zope.app.applicationcontrol.interfaces import IZopeVersion
-from zope.app.applicationcontrol.zopeversion import ZopeVersion
-
-
-def isSVNAvailable():
- try:
- proc = subprocess.Popen('svn help', shell=True, stdout=subprocess.PIPE)
- except OSError:
- return False
- else:
- return proc.wait() == 0
-
-class MockZopeVersion(ZopeVersion):
-
- def setSVNInfoOutput(self, lines):
- self.__lines = lines
-
- def _getSVNInfoOutput(self):
- return self.__lines
-
-class Test(unittest.TestCase):
-
- def setUp(self):
- self.tmpdir = tempfile.mkdtemp(prefix="test-zopeversion-")
- self.zopeVersion = MockZopeVersion(self.tmpdir)
-
- def tearDown(self):
- shutil.rmtree(self.tmpdir)
-
- def prepare(self, version, fields):
- if version:
- f = open(os.path.join(self.tmpdir, "version.txt"), "w")
- try:
- f.write(version)
- if not version.endswith("\n"):
- f.write("\n")
- finally:
- f.close()
- if fields:
- os.mkdir(os.path.join(self.tmpdir, ".svn"))
- self.zopeVersion.setSVNInfoOutput(fields)
-
- def test_IVerify(self):
- verifyObject(IZopeVersion, self.zopeVersion)
-
- def test_ZopeVersion(self):
- self.prepare(None, None)
- self.assertEqual(self.zopeVersion.getZopeVersion(),
- "Development/Unknown")
-
- def test_ZopeVersion_svntrunk(self):
- self.prepare(None, [
- "URL: svn+ssh://svn.zope.org/repos/main/Zope3/trunk/src/zope",
- "Revision: 10000"
- ])
- self.assertEqual(self.zopeVersion.getZopeVersion(),
- "Development/Revision: 10000")
-
- def test_ZopeVersion_svnbranch(self):
- self.prepare(None, [
- "URL: svn+ssh://svn.zope.org/repos/main/Zope3/branches/Zope3-1.0/src/zope",
- "Revision: 10000"
- ])
- self.assertEqual(self.zopeVersion.getZopeVersion(),
- "Development/Revision: 10000/Branch: Zope3-1.0")
-
- def test_ZopeVersion_svntag(self):
- self.prepare(None, [
- "URL: svn+ssh://svn.zope.org/repos/main/Zope3/tags/Zope3-1.0/src/zope",
- "Revision: 10000"
- ])
- self.assertEqual(self.zopeVersion.getZopeVersion(),
- "Development/Revision: 10000/Tag: Zope3-1.0")
-
- def test_ZopeVersion_svn_unknown(self):
- self.prepare(None, ["Nope: "])
- self.assertEqual(self.zopeVersion.getZopeVersion(),
- "Development/Unknown")
-
- def test_ZopeVersion_release(self):
- self.prepare("Zope 3 1.0.0", None)
- self.assertEqual(self.zopeVersion.getZopeVersion(),
- "Zope 3 1.0.0")
-
- def test_ZopeVersion_release_empty(self):
- self.prepare(" ", None)
- self.assertEqual(self.zopeVersion.getZopeVersion(),
- "Development/Unknown")
-
- def test_ZopeVersion_release_svntrunk(self):
- # demonstrate that the version.txt data is discarded if
- # there's revision-control metadata:
- self.prepare("Zope 3 1.0.0", [
- "URL: svn+ssh://svn.zope.org/repos/main/Zope3/trunk/src/zope",
- "Revision: 10000"
- ])
- self.assertEqual(self.zopeVersion.getZopeVersion(),
- "Development/Revision: 10000")
-
- def test_WrongLocale(self):
- """Demonstrate bug 177733"""
- if isSVNAvailable():
- currentPath = os.path.dirname(os.path.abspath(__file__))
- zv = ZopeVersion(currentPath)
- zv.getZopeVersion()
- # check that we don't get a 'Development/Unknown' version
- self.assert_(zv.result.startswith('Development/Revision: '))
-
-def test_suite():
- return unittest.makeSuite(Test)
-
-if __name__ == '__main__':
- unittest.main(defaultTest="test_suite")
Copied: zope.app.applicationcontrol/tags/3.4.3/src/zope/app/applicationcontrol/tests/test_zopeversion.py (from rev 89057, zope.app.applicationcontrol/trunk/src/zope/app/applicationcontrol/tests/test_zopeversion.py)
===================================================================
--- zope.app.applicationcontrol/tags/3.4.3/src/zope/app/applicationcontrol/tests/test_zopeversion.py (rev 0)
+++ zope.app.applicationcontrol/tags/3.4.3/src/zope/app/applicationcontrol/tests/test_zopeversion.py 2008-07-30 18:31:59 UTC (rev 89059)
@@ -0,0 +1,142 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 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.
+#
+##############################################################################
+"""Zope Version Tests
+
+$Id$
+"""
+import os
+import shutil
+import subprocess
+import tempfile
+import unittest
+
+from zope.interface.verify import verifyObject
+from zope.app.applicationcontrol.interfaces import IZopeVersion
+from zope.app.applicationcontrol.zopeversion import ZopeVersion
+
+
+def isSVNAvailable():
+ try:
+ proc = subprocess.Popen('svn help', shell=True, stdout=subprocess.PIPE)
+ except OSError:
+ return False
+ else:
+ return proc.wait() == 0
+
+
+def isSVNCheckout(dir):
+ return os.path.isdir(os.path.join(dir, '.svn'))
+
+
+class MockZopeVersion(ZopeVersion):
+
+ def setSVNInfoOutput(self, lines):
+ self.__lines = lines
+
+ def _getSVNInfoOutput(self):
+ return self.__lines
+
+class Test(unittest.TestCase):
+
+ def setUp(self):
+ self.tmpdir = tempfile.mkdtemp(prefix="test-zopeversion-")
+ self.zopeVersion = MockZopeVersion(self.tmpdir)
+
+ def tearDown(self):
+ shutil.rmtree(self.tmpdir)
+
+ def prepare(self, version, fields):
+ if version:
+ f = open(os.path.join(self.tmpdir, "version.txt"), "w")
+ try:
+ f.write(version)
+ if not version.endswith("\n"):
+ f.write("\n")
+ finally:
+ f.close()
+ if fields:
+ os.mkdir(os.path.join(self.tmpdir, ".svn"))
+ self.zopeVersion.setSVNInfoOutput(fields)
+
+ def test_IVerify(self):
+ verifyObject(IZopeVersion, self.zopeVersion)
+
+ def test_ZopeVersion(self):
+ self.prepare(None, None)
+ self.assertEqual(self.zopeVersion.getZopeVersion(),
+ "Development/Unknown")
+
+ def test_ZopeVersion_svntrunk(self):
+ self.prepare(None, [
+ "URL: svn+ssh://svn.zope.org/repos/main/Zope3/trunk/src/zope",
+ "Revision: 10000"
+ ])
+ self.assertEqual(self.zopeVersion.getZopeVersion(),
+ "Development/Revision: 10000")
+
+ def test_ZopeVersion_svnbranch(self):
+ self.prepare(None, [
+ "URL: svn+ssh://svn.zope.org/repos/main/Zope3/branches/Zope3-1.0/src/zope",
+ "Revision: 10000"
+ ])
+ self.assertEqual(self.zopeVersion.getZopeVersion(),
+ "Development/Revision: 10000/Branch: Zope3-1.0")
+
+ def test_ZopeVersion_svntag(self):
+ self.prepare(None, [
+ "URL: svn+ssh://svn.zope.org/repos/main/Zope3/tags/Zope3-1.0/src/zope",
+ "Revision: 10000"
+ ])
+ self.assertEqual(self.zopeVersion.getZopeVersion(),
+ "Development/Revision: 10000/Tag: Zope3-1.0")
+
+ def test_ZopeVersion_svn_unknown(self):
+ self.prepare(None, ["Nope: "])
+ self.assertEqual(self.zopeVersion.getZopeVersion(),
+ "Development/Unknown")
+
+ def test_ZopeVersion_release(self):
+ self.prepare("Zope 3 1.0.0", None)
+ self.assertEqual(self.zopeVersion.getZopeVersion(),
+ "Zope 3 1.0.0")
+
+ def test_ZopeVersion_release_empty(self):
+ self.prepare(" ", None)
+ self.assertEqual(self.zopeVersion.getZopeVersion(),
+ "Development/Unknown")
+
+ def test_ZopeVersion_release_svntrunk(self):
+ # demonstrate that the version.txt data is discarded if
+ # there's revision-control metadata:
+ self.prepare("Zope 3 1.0.0", [
+ "URL: svn+ssh://svn.zope.org/repos/main/Zope3/trunk/src/zope",
+ "Revision: 10000"
+ ])
+ self.assertEqual(self.zopeVersion.getZopeVersion(),
+ "Development/Revision: 10000")
+
+ def test_WrongLocale(self):
+ """Demonstrate bug 177733"""
+ 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
+ self.assert_(zv.result.startswith('Development/Revision: '))
+
+def test_suite():
+ return unittest.makeSuite(Test)
+
+if __name__ == '__main__':
+ unittest.main(defaultTest="test_suite")
More information about the Checkins
mailing list