[Checkins] SVN: zope.size/trunk/s removed test registration and __main__ slug, fixed imports and PEP8
Thomas Lotze
tl at gocept.com
Mon Feb 14 15:49:46 EST 2011
Log message for revision 120335:
removed test registration and __main__ slug, fixed imports and PEP8
Changed:
U zope.size/trunk/setup.py
U zope.size/trunk/src/zope/size/tests.py
-=-
Modified: zope.size/trunk/setup.py
===================================================================
--- zope.size/trunk/setup.py 2011-02-14 16:17:48 UTC (rev 120334)
+++ zope.size/trunk/setup.py 2011-02-14 20:49:46 UTC (rev 120335)
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2006 Zope Foundation and Contributors.
+# Copyright (c) 2006, 2011 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
@@ -19,15 +19,14 @@
"""Setup for zope.size package
"""
-import os
-
from setuptools import setup, find_packages
setup(name='zope.size',
- version = '3.5.0dev',
+ version='3.5.0dev',
url='http://pypi.python.org/pypi/zope.size',
license='ZPL 2.1',
- description='Interfaces and simple adapter that give the size of an object',
+ description=\
+ 'Interfaces and simple adapter that give the size of an object',
author='Zope Foundation and Contributors',
author_email='zope-dev at zope.org',
long_description=\
Modified: zope.size/trunk/src/zope/size/tests.py
===================================================================
--- zope.size/trunk/src/zope/size/tests.py 2011-02-14 16:17:48 UTC (rev 120334)
+++ zope.size/trunk/src/zope/size/tests.py 2011-02-14 20:49:46 UTC (rev 120335)
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
+# Copyright (c) 2001, 2002, 2011 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
@@ -16,6 +16,7 @@
import unittest
from zope.size.interfaces import ISized
+
class DummyObject(object):
def __init__(self, size):
@@ -24,6 +25,7 @@
def getSize(self):
return self._size
+
class Test(unittest.TestCase):
def testImplementsISized(self):
@@ -80,10 +82,3 @@
self.assertEqual(byteDisplay(2048).mapping, {'size': '2'})
self.assertEqual(byteDisplay(2000000), u'${size} MB')
self.assertEqual(byteDisplay(2000000).mapping, {'size': '1.91'})
-
-def test_suite():
- loader = unittest.TestLoader()
- return loader.loadTestsFromTestCase(Test)
-
-if __name__=='__main__':
- unittest.TextTestRunner().run(test_suite())
More information about the checkins
mailing list