Mercurial > babel > old > mirror
diff 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 |
line wrap: on
line diff
--- a/0.9.x/babel/messages/tests/catalog.py +++ b/0.9.x/babel/messages/tests/catalog.py @@ -251,7 +251,11 @@ def suite(): suite = unittest.TestSuite() - suite.addTest(doctest.DocTestSuite(catalog, optionflags=doctest.ELLIPSIS)) + if hasattr(doctest, 'ELLIPSIS'): + suite.addTest(doctest.DocTestSuite(catalog, optionflags=doctest.ELLIPSIS)) + else: + # Python 2.3 has no doctest.ELLIPSIS option, it's implicit + suite.addTest(doctest.DocTestSuite(catalog)) suite.addTest(unittest.makeSuite(MessageTestCase)) suite.addTest(unittest.makeSuite(CatalogTestCase)) return suite