Mercurial > babel > old > mirror
comparison 0.9.x/babel/messages/tests/catalog.py @ 510:4c473bedd528 stable
Fix Python 2.3 compatibility for 0.9 branch (closes #233)
author | fschwarz |
---|---|
date | Fri, 04 Mar 2011 14:16:15 +0000 |
parents | 4adedf7d0f04 |
children |
comparison
equal
deleted
inserted
replaced
509:cd2dec0823c9 | 510:4c473bedd528 |
---|---|
249 if key in ('POT-Creation-Date', 'PO-Revision-Date'): | 249 if key in ('POT-Creation-Date', 'PO-Revision-Date'): |
250 self.assertEqual(value, '2009-03-09 15:47-0700') | 250 self.assertEqual(value, '2009-03-09 15:47-0700') |
251 | 251 |
252 def suite(): | 252 def suite(): |
253 suite = unittest.TestSuite() | 253 suite = unittest.TestSuite() |
254 suite.addTest(doctest.DocTestSuite(catalog, optionflags=doctest.ELLIPSIS)) | 254 if hasattr(doctest, 'ELLIPSIS'): |
255 suite.addTest(doctest.DocTestSuite(catalog, optionflags=doctest.ELLIPSIS)) | |
256 else: | |
257 # Python 2.3 has no doctest.ELLIPSIS option, it's implicit | |
258 suite.addTest(doctest.DocTestSuite(catalog)) | |
255 suite.addTest(unittest.makeSuite(MessageTestCase)) | 259 suite.addTest(unittest.makeSuite(MessageTestCase)) |
256 suite.addTest(unittest.makeSuite(CatalogTestCase)) | 260 suite.addTest(unittest.makeSuite(CatalogTestCase)) |
257 return suite | 261 return suite |
258 | 262 |
259 if __name__ == '__main__': | 263 if __name__ == '__main__': |