[Checkins] SVN: ZConfig/trunk/ Packaging fixes:
Tres Seaver
tseaver at palladion.com
Mon Dec 24 13:24:03 EST 2007
Log message for revision 82434:
Packaging fixes:
o Make it possible to run unit tests via 'python setup.py test'.
o Include changelog in long description.
Changed:
_U ZConfig/trunk/
U ZConfig/trunk/NEWS.txt
U ZConfig/trunk/ZConfig/components/logger/tests/test_logger.py
U ZConfig/trunk/setup.py
-=-
Property changes on: ZConfig/trunk
___________________________________________________________________
Name: svn:ignore
- bin
build
develop-eggs
dist
eggs
parts
.installed.cfg
+ bin
build
develop-eggs
dist
eggs
parts
.installed.cfg
*.egg-info
Modified: ZConfig/trunk/NEWS.txt
===================================================================
--- ZConfig/trunk/NEWS.txt 2007-12-24 17:45:07 UTC (rev 82433)
+++ ZConfig/trunk/NEWS.txt 2007-12-24 18:24:02 UTC (rev 82434)
@@ -2,7 +2,13 @@
Change History for ZConfig
==========================
+ZConfig 2.5.1 (unreleased)
+--------------------------
+- Made it possible to run unit tests via 'python setup.py test'.
+
+- Added better error messages to test failure assertions.
+
ZConfig 2.5 (31 Aug 2007)
-------------------------
Modified: ZConfig/trunk/ZConfig/components/logger/tests/test_logger.py
===================================================================
--- ZConfig/trunk/ZConfig/components/logger/tests/test_logger.py 2007-12-24 17:45:07 UTC (rev 82433)
+++ ZConfig/trunk/ZConfig/components/logger/tests/test_logger.py 2007-12-24 18:24:02 UTC (rev 82434)
@@ -69,7 +69,7 @@
while self._created:
os.unlink(self._created.pop())
- assert loghandler._reopenable_handlers == []
+ self.assertEqual(loghandler._reopenable_handlers, [])
loghandler.closeFiles()
loghandler._reopenable_handlers == []
@@ -386,7 +386,7 @@
}
text = self._sampleconfig_template % d
conf = self.get_config(text)
- assert len(conf.loggers) == 2
+ self.assertEqual(len(conf.loggers), 2)
# Build the loggers from the configuration, and write to them:
conf.loggers[0]().info("message 1")
conf.loggers[1]().info("message 2")
@@ -472,7 +472,7 @@
}
text = self._sampleconfig_template % d
conf = self.get_config(text)
- assert len(conf.loggers) == 2
+ self.assertEqual(len(conf.loggers), 2)
# Build the loggers from the configuration, and write to them:
conf.loggers[0]().info("message 1")
conf.loggers[1]().info("message 2")
Modified: ZConfig/trunk/setup.py
===================================================================
--- ZConfig/trunk/setup.py 2007-12-24 17:45:07 UTC (rev 82433)
+++ ZConfig/trunk/setup.py 2007-12-24 18:24:02 UTC (rev 82434)
@@ -1,12 +1,32 @@
from setuptools import find_packages, setup
+README = open('README.txt').read()
+NEWS = open('NEWS.txt').read()
+
+def alltests():
+ import os
+ import sys
+ from unittest import TestSuite
+ # use the zope.testing testrunner machinery to find all the
+ # test suites we've put under ourselves
+ from zope.testing.testrunner import get_options
+ from zope.testing.testrunner import find_suites
+ from zope.testing.testrunner import configure_logging
+ configure_logging()
+ here = os.path.abspath(os.path.dirname(sys.argv[0]))
+ args = sys.argv[:]
+ defaults = ['--test-path', here]
+ options = get_options(args, defaults)
+ suites = list(find_suites(options))
+ return TestSuite(suites)
+
setup(
name="ZConfig",
- version="2.5",
+ version="2.5.1dev",
author="Fred L. Drake, Jr.",
author_email="fred at zope.com",
description="Structured Configuration Library",
- long_description=open("README.txt").read(),
+ long_description=README + '\n\n' + NEWS,
license="ZPL 2.1",
url='http://www.zope.org/Members/fdrake/zconfig/',
@@ -22,4 +42,8 @@
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
],
+ test_suite='__main__.alltests', # support 'setup.py test'
+ tests_require=[
+ 'zope.testing',
+ ]
)
More information about the Checkins
mailing list