[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/ Merged
from trunk:
Jim Fulton
jim at zope.com
Wed Aug 11 14:08:29 EDT 2004
Log message for revision 27006:
Merged from trunk:
r26878 | jim | 2004-08-03 12:25:34 -0400 (Tue, 03 Aug 2004) | 3 lines
Removed assert statements from test code. Assert statements
don't belong in test code.
Changed:
U Zope3/branches/ZopeX3-3.0/src/zope/app/form/browser/tests/test_browserwidget.py
U Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/browser/tests/test_translate.py
U Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/tests/test_messagecatalog.py
U Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/tests/test_translationdomain.py
U Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_imessagecatalog.py
U Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_itranslationdomain.py
U Zope3/branches/ZopeX3-3.0/src/zope/proxy/tests/test_proxy.py
-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/form/browser/tests/test_browserwidget.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/form/browser/tests/test_browserwidget.py 2004-08-11 17:46:45 UTC (rev 27005)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/form/browser/tests/test_browserwidget.py 2004-08-11 18:08:28 UTC (rev 27006)
@@ -40,7 +40,6 @@
_WidgetFactory = None
def setUpContent(self, desc=u'', title=u'Foo Title'):
- assert self._FieldFactory is not None
class ITestContent(Interface):
foo = self._FieldFactory(
title=title,
@@ -52,7 +51,6 @@
field = field.bind(self.content)
request = TestRequest(HTTP_ACCEPT_LANGUAGE='pl')
request.form['field.foo'] = u'Foo Value'
- assert self._WidgetFactory is not None
self._widget = self._WidgetFactory(field, request)
def setUp(self):
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/browser/tests/test_translate.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/browser/tests/test_translate.py 2004-08-11 17:46:45 UTC (rev 27005)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/browser/tests/test_translate.py 2004-08-11 18:08:28 UTC (rev 27006)
@@ -101,9 +101,9 @@
def testAddDeleteLanguage(self):
self._view.addLanguage('es')
- assert 'es' in self._view.getAllLanguages()
+ self.assert_('es' in self._view.getAllLanguages())
self._view.deleteLanguages(['es'])
- assert 'es' not in self._view.getAllLanguages()
+ self.assert_('es' not in self._view.getAllLanguages())
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/tests/test_messagecatalog.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/tests/test_messagecatalog.py 2004-08-11 17:46:45 UTC (rev 27005)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/tests/test_messagecatalog.py 2004-08-11 18:08:28 UTC (rev 27006)
@@ -35,8 +35,10 @@
def setUp(self):
self._catalog = self._getMessageCatalog()
- assert verifyObject(ILocalMessageCatalog, self._catalog)
+ def testInterface(self):
+ verifyObject(ILocalMessageCatalog, self._catalog)
+
def testGetFullMessage(self):
catalog = self._catalog
self.assertEqual(catalog.getFullMessage('short_greeting'),
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/tests/test_translationdomain.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/tests/test_translationdomain.py 2004-08-11 17:46:45 UTC (rev 27005)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/tests/test_translationdomain.py 2004-08-11 18:08:28 UTC (rev 27006)
@@ -59,8 +59,9 @@
def setUp(self):
self._domain = self._getTranslationDomain()
- assert verifyObject(ITranslationDomain, self._domain)
+ def testInterface(self):
+ verifyObject(ITranslationDomain, self._domain)
def _getLanguages(self, domain):
languages = domain.getAllLanguages()
@@ -143,8 +144,9 @@
def setUp(self):
self._domain = self._getTranslationDomain()
- assert verifyObject(ISyncTranslationDomain, self._domain)
+ def testInterface(self):
+ verifyObject(ISyncTranslationDomain, self._domain)
def testGetMessagesMapping(self):
mapping = self._domain.getMessagesMapping(['de', 'en'],
Modified: Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_imessagecatalog.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_imessagecatalog.py 2004-08-11 17:46:45 UTC (rev 27005)
+++ Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_imessagecatalog.py 2004-08-11 18:08:28 UTC (rev 27006)
@@ -33,8 +33,9 @@
def setUp(self):
self._catalog = self._getMessageCatalog()
- assert verifyObject(IMessageCatalog, self._catalog)
+ def testInterface(self):
+ verifyObject(IMessageCatalog, self._catalog)
def testGetMessage(self):
catalog = self._catalog
Modified: Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_itranslationdomain.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_itranslationdomain.py 2004-08-11 17:46:45 UTC (rev 27005)
+++ Zope3/branches/ZopeX3-3.0/src/zope/i18n/tests/test_itranslationdomain.py 2004-08-11 18:08:28 UTC (rev 27006)
@@ -46,12 +46,14 @@
def setUp(self):
super(TestITranslationDomain, self).setUp()
self._domain = self._getTranslationDomain()
- assert verifyObject(ITranslationDomain, self._domain)
# Setup the negotiator utility
utilities = getService(Utilities)
utilities.provideUtility(INegotiator, negotiator)
+ def testInterface(self):
+ verifyObject(ITranslationDomain, self._domain)
+
def testSimpleTranslate(self):
translate = self._domain.translate
eq = self.assertEqual
Modified: Zope3/branches/ZopeX3-3.0/src/zope/proxy/tests/test_proxy.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/proxy/tests/test_proxy.py 2004-08-11 17:46:45 UTC (rev 27005)
+++ Zope3/branches/ZopeX3-3.0/src/zope/proxy/tests/test_proxy.py 2004-08-11 18:08:28 UTC (rev 27006)
@@ -102,7 +102,8 @@
class MyProxy3(MyProxy2):
def __init__(self, arg):
- assert list(self) == list('value')
+ if list(self) != list('value'):
+ raise AssertionError("list(self) != list('value')")
super(MyProxy3, self).__init__('another')
p = MyProxy3('notused')
More information about the Zope3-Checkins
mailing list