[Zope3-checkins] CVS: Zope3/src/zope/i18n/tests -
test_messageid.py:1.5
Philipp von Weitershausen
philikon at philikon.de
Fri Feb 20 04:24:39 EST 2004
Update of /cvs-repository/Zope3/src/zope/i18n/tests
In directory cvs.zope.org:/tmp/cvs-serv11800/tests
Modified Files:
test_messageid.py
Log Message:
Converted MessageID test to doctest.
=== Zope3/src/zope/i18n/tests/test_messageid.py 1.4 => 1.5 ===
--- Zope3/src/zope/i18n/tests/test_messageid.py:1.4 Mon Aug 18 15:20:23 2003
+++ Zope3/src/zope/i18n/tests/test_messageid.py Fri Feb 20 04:24:38 2004
@@ -17,31 +17,12 @@
"""
import unittest
-from zope.i18n.messageid import MessageIDFactory, MessageID
-
-
-class TestMessageID(unittest.TestCase):
- def testMessageIDFactory(self):
- eq = self.assertEqual
- fact = MessageIDFactory('test')
- id = fact(u'this is a test')
- self.failUnless(isinstance(id, MessageID))
- self.failUnless(isinstance(id, unicode))
- eq(id.domain, 'test')
- eq(id.default, u'this is a test')
- id.default = u'blah'
- eq(id.default, u'blah')
- id = fact(u'test-id', 'default test')
- eq(id, u'test-id')
- eq(id.default, u'default test')
- eq(id.domain, 'test')
-
+from zope.testing.doctestunit import DocTestSuite
def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TestMessageID))
- return suite
-
+ return unittest.TestSuite((
+ DocTestSuite('zope.i18n.messageid'),
+ ))
if __name__ == '__main__':
unittest.main()
More information about the Zope3-Checkins
mailing list