Mercurial > babel > mirror
comparison babel/catalog/tests/pofile.py @ 17:55e22bc56f0c trunk
Recognize python-format messages also for unnamed parameters.
author | cmlenz |
---|---|
date | Thu, 31 May 2007 17:07:49 +0000 |
parents | e6ba3e878b10 |
children | b09e90803d1b |
comparison
equal
deleted
inserted
replaced
16:a8d0dab06216 | 17:55e22bc56f0c |
---|---|
14 import doctest | 14 import doctest |
15 import unittest | 15 import unittest |
16 | 16 |
17 from babel.catalog import pofile | 17 from babel.catalog import pofile |
18 | 18 |
19 | |
20 class PythonFormatFlagUnitTest(unittest.TestCase): | |
21 | |
22 def test_without_name(self): | |
23 assert pofile.PYTHON_FORMAT('foo %d bar') | |
24 assert pofile.PYTHON_FORMAT('foo %s bar') | |
25 assert pofile.PYTHON_FORMAT('foo %r bar') | |
26 | |
27 | |
19 def suite(): | 28 def suite(): |
20 suite = unittest.TestSuite() | 29 suite = unittest.TestSuite() |
21 suite.addTest(doctest.DocTestSuite(pofile)) | 30 suite.addTest(doctest.DocTestSuite(pofile)) |
31 suite.addTest(unittest.makeSuite(PythonFormatFlagUnitTest)) | |
22 return suite | 32 return suite |
23 | 33 |
24 if __name__ == '__main__': | 34 if __name__ == '__main__': |
25 unittest.main(defaultTest='suite') | 35 unittest.main(defaultTest='suite') |