summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_gettext.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #28563: Make plural form selection more lenient and acceptingSerhiy Storchaka2016-11-141-6/+10
| | | | non-integer numbers. Django tests depend on this.
* Issue #28563: Fixed possible DoS and arbitrary code execution when handleSerhiy Storchaka2016-11-081-1/+84
| | | | | plural form selections in the gettext module. The expression parser now supports exact syntax supported by GNU gettext.
* #17898: reset k and v so that the loop doesn't use an old valueAndrew Kuchling2015-04-141-0/+27
|
* Merged revisions 86236,86240,86332,86340,87271,87273,87447 via svnmerge fromÉric Araujo2011-02-031-23/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k To comply with the 2.x doc style, the methods in trace.rst use brackets around optional arguments. The rest is a mostly straight merge, modulo support changed to test_support and use of the old super call style in test_tuple. ........ r86236 | eric.araujo | 2010-11-06 03:44:43 +0100 (sam., 06 nov. 2010) | 2 lines Make sure each test can be run standalone (./python Lib/distutils/tests/x.py) ........ r86240 | eric.araujo | 2010-11-06 05:11:59 +0100 (sam., 06 nov. 2010) | 2 lines Prevent ResourceWarnings in test_gettext ........ r86332 | eric.araujo | 2010-11-08 19:15:17 +0100 (lun., 08 nov. 2010) | 4 lines Add missing NEWS entry for a fix committed by Senthil. All recent modifications to distutils should now be covered in NEWS. ........ r86340 | eric.araujo | 2010-11-08 22:48:23 +0100 (lun., 08 nov. 2010) | 2 lines This was actually fixed for the previous alpha. ........ r87271 | eric.araujo | 2010-12-15 20:09:58 +0100 (mer., 15 déc. 2010) | 2 lines Improve trace documentation (#9264). Patch by Eli Bendersky. ........ r87273 | eric.araujo | 2010-12-15 20:30:15 +0100 (mer., 15 déc. 2010) | 2 lines Use nested method directives, rewrap long lines, fix whitespace. ........ r87447 | eric.araujo | 2010-12-23 20:13:05 +0100 (jeu., 23 déc. 2010) | 2 lines Fix typo in superclass method name ........
* Merged revisions 86239,86241 via svnmerge fromÉric Araujo2010-11-061-0/+1
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86239 | eric.araujo | 2010-11-06 05:09:29 +0100 (sam., 06 nov. 2010) | 2 lines Fix caching error found by regrtest -R (#10229) ........ r86241 | eric.araujo | 2010-11-06 05:24:00 +0100 (sam., 06 nov. 2010) | 2 lines Add missing NEWS entry for r86239. ........
* Merged revisions 85223 via svnmerge fromÉric Araujo2010-10-041-0/+31
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85223 | eric.araujo | 2010-10-05 01:52:37 +0200 (mar., 05 oct. 2010) | 3 lines Fix interaction of custom translation classes and caching (#9042) ........
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-1/+1
|
* Make test.test_support.EnvironmentVarGuard behave like a dictionary.Walter Dörwald2009-05-011-6/+4
| | | | | All changes are mirrored to the underlying os.environ dict, but rolled back on exit from the with block.
* Standardize on test.test_support.run_unittest() (as opposed to a mix of ↵Collin Winter2007-04-251-13/+2
| | | | run_unittest() and run_suite()). Also, add functionality to run_unittest() that admits usage of unittest.TestLoader.loadTestsFromModule().
* Patch #1349274: gettext.install() now optionally installs additionalGeorg Brandl2006-02-191-0/+8
| | | | translation functions other than _() in the builtin namespace.
* Don't try to create the directory if it already exists, otherwise the test failsNeal Norwitz2004-07-191-1/+2
|
* Added a test for the fix of SF bug #658233, where continuation linesBarry Warsaw2003-05-201-12/+52
| | | | | | | | in .po metadata caused a crash. Also, removed some unnecessary code. Backport candidate.
* Make tests clean up after themselves better. This means:Brett Cannon2003-04-271-2/+18
| | | | | | | | * call tearDown when Setup is called * shutil.rmtree the root of the created directory instead of just the leaf directory * set the LANGUAGE environment variable to what it was originally and not assume 'en'.
* UnicodeTranslationsTest.setUp(): Removed the coerce flag to theBarry Warsaw2003-04-241-1/+1
| | | | GNUTranslations constructor.
* Whitespace normalization.Tim Peters2003-04-241-1/+1
|
* From http://mail.python.org/pipermail/i18n-sig/2003-April/001557.htmlBarry Warsaw2003-04-111-125/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Expose NullTranslations and GNUTranslations to __all__ - Set the default charset to iso-8859-1. It used to be None, which would cause problems with .ugettext() if the file had no charset parameter. Arguably, the po/mo file would be broken, but I still think iso-8859-1 is a reasonable default. - Add a "coerce" default argument to GNUTranslations's constructor. The reason for this is that in Zope, we want all msgids and msgstrs to be Unicode. For the latter, we could use .ugettext() but there isn't currently a mechanism for Unicode-ifying msgids. The plan then is that the charset parameter specifies the encoding for both the msgids and msgstrs, and both are decoded to Unicode when read. For example, we might encode po files with utf-8. I think the GNU gettext tools don't care. Since this could potentially break code [*] that wants to use the encoded interface .gettext(), the constructor flag is added, defaulting to False. Most code I suspect will want to set this to True and use .ugettext(). - A few other minor changes from the Zope project, including asserting that a zero-length msgid must have a Project-ID-Version header for it to be counted as the metadata record.
* Patch #633547: Support plural forms. Do TODOs in test suite.Martin v. Löwis2002-11-211-111/+248
|
* Move the setting of os.environ['LANGUAGE'] to setup(), and reset it toGuido van Rossum2002-07-201-1/+2
| | | | 'en' in teardown(). This way hopefully test_time.py won't fail.
* Update an email address.Barry Warsaw2001-08-281-10/+10
|
* Quick and dirty fix for test_extcall failures trigged by Guido'sBarry Warsaw2001-08-241-2/+2
| | | | | | | recent classobject.c change. When calling an unbound method with no instances as first argument, the error message has changed. The message now contains the class name, but the output text being compared to is too generic, so skip printing it.
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-5/+5
|
* For current directory use os.curdir, not ".".Jack Jansen2000-09-151-2/+2
|
* Expand the test suite to test both the GNU gettext and translationBarry Warsaw2000-08-301-252/+128
| | | | class-based APIs.
* Open binary files in binary mode. Fixes test failure under Windows.Tim Peters2000-08-261-1/+1
|
* Group consensus is that supporting alternative locale categories isBarry Warsaw2000-08-251-6/+0
| | | | useless. So the test of the dcgettext() function is removed.
* Set this test up so that we don't have to create xx/LC_MESSAGES in theBarry Warsaw2000-08-251-66/+320
| | | | | cvs tree. It creates the directory and gettext.mo file on the fly, from the base64 encode binary data.
* Test suite for new gettext.py module.Barry Warsaw2000-08-251-0/+76