summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_gettext.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-130655: gettext: Add fallback testcase (GH-136857) (#136863)Miss Islington (bot)2025-07-201-0/+7
| | | | | | gh-130655: gettext: Add fallback testcase (GH-136857) (cherry picked from commit c6e6fe92cd8b90d546652764e3eaf1631da16f8f) Co-authored-by: Dominic H <dom@dominic.sk>
* [3.13] gh-130655: Add a test for big-endian MO files in gettext (GH-132469) ↵Miss Islington (bot)2025-05-011-0/+26
| | | | | | | (GH-133248) (cherry picked from commit 474f296718eb59391c929eec0e4c3df5fc11fb96) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.13] gh-130320: gettext: Test fallback translations (GH-130321) (GH-132359)Miss Islington (bot)2025-04-101-0/+56
| | | | | (cherry picked from commit 4d58c8cb247b585051bfbacd79f77aafd18986b7) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.13] gh-130655: Add a test for corrupt `.mo` files in `gettext` ↵Miss Islington (bot)2025-04-041-0/+39
| | | | | | | | (GH-131911) (#132079) gh-130655: Add a test for corrupt `.mo` files in `gettext` (GH-131911) (cherry picked from commit a126cefc176a7ddbd1a09ce560195f6fd81a5c92) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.13] gh-130655: Add a test for bad magic numbers in `.mo` files parsed by ↵Miss Islington (bot)2025-04-041-0/+16
| | | | | | | | `gettext` (GH-131909) (#132077) gh-130655: Add a test for bad magic numbers in `.mo` files parsed by `gettext` (GH-131909) (cherry picked from commit 16a6270aa61c86c430a308c0f766a69a88c9a3a5) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.13] gh-130655: Add tests for `gettext.find()` (GH-130691) (#132084)Miss Islington (bot)2025-04-041-0/+70
| | | | | | | | gh-130655: Add tests for `gettext.find()` (GH-130691) (cherry picked from commit 3118693a1a3db0da96c565a2de015a806c892625) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
* [3.13] gh-130655: Increase test coverage of gettext._expand_lang() ↵Miss Islington (bot)2025-02-281-0/+27
| | | | | | | (GH-130656) (GH-130671) (cherry picked from commit 24c52cb14c4b044154bd46bd1b2a9c37076caeb9) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.13] gh-130193: Increase test coverage of gettext.c2py (GH-130208) (GH-130217)Miss Islington (bot)2025-02-171-1/+7
| | | | | (cherry picked from commit fb2d325725dcc881868b576b9d0d9f4bf7f24fe0) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.13] gh-130177: Fix unintentionally skipped tests in test_gettext ↵Miss Islington (bot)2025-02-161-1/+1
| | | | | | | (GH-130178) (GH-130183) (cherry picked from commit 2e8044a4f74f5fc19e5249139c171403aff0118d) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* gh-88434: Emit deprecation warnings for non-integer numbers in gettext if ↵Serhiy Storchaka2023-10-141-12/+14
| | | | translation not found (GH-110574)
* gh-110519: Improve deprecation warning in the gettext module (#110520)Serhiy Storchaka2023-10-091-48/+130
| | | | | | | | Deprecation warning about non-integer numbers in gettext now always refers to the line in the user code where gettext function or method is used. Previously, it could refer to a line in gettext code. Also, increase test coverage for NullTranslations and domain-aware functions like dngettext().
* gh-109864: Make test_gettext tests order independent (GH-109866)Serhiy Storchaka2023-10-071-2/+13
|
* gh-62519: Make pgettext search plurals when translation is not found (#107118)Tomas R2023-07-231-0/+4
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-18319: gettext() can retrieve a message even if a plural form exists ↵Gilles Bassière2023-07-231-0/+4
| | | | (#19869)
* bpo-45046: Support context managers in unittest (GH-28045)Serhiy Storchaka2022-05-081-5/+2
| | | | | | Add methods enterContext() and enterClassContext() in TestCase. Add method enterAsyncContext() in IsolatedAsyncioTestCase. Add function enterModuleContext().
* bpo-44235: Remove deprecated functions in the gettext module. (GH-26378)Dong-hee Na2021-05-301-188/+5
|
* bpo-41521: Rename blacklist parameter to not_exported (GH-21824)Victor Stinner2020-08-171-2/+2
| | | | Rename "blacklist" parameter of test.support.check__all__() to "not_exported".
* bpo-40275: Use new test.support helper submodules in tests (GH-21412)Hai Shi2020-07-091-2/+3
|
* Remove unused imports in tests (GH-14518)Victor Stinner2019-07-011-1/+0
|
* bpo-36239: Skip comments in gettext infos (GH-12255)Julien Palard2019-05-091-0/+13
|
* bpo-2504: Add pgettext() and variants to gettext. (GH-7253)Cheryl Sabella2018-11-071-25/+139
|
* bpo-33710: Deprecate l*gettext() and related functions in the gettext ↵Serhiy Storchaka2018-10-271-48/+114
| | | | | | module. (GH-10139) They return encoded bytes and are Python 2 artifacts.
* bpo-29755: Fixed the lgettext() family of functions in the gettext module. ↵Serhiy Storchaka2017-06-201-9/+123
| | | | | | | | (#2266) They now always return bytes. Updated the gettext documentation.
* bpo-28692: Deprecate using non-integer value for selecting a plural form in ↵Serhiy Storchaka2017-03-121-3/+6
| | | | gettext. (#507)
* 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: Make plural form selection more lenient and acceptingSerhiy Storchaka2016-11-141-6/+10
| |\ | | | | | | | | | non-integer numbers. Django tests depend on this.
| | * 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: 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.
| * | | 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.
| | * | 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.
| | | * 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.
* | | | Issue #23277: Remove unused imports in tests.Serhiy Storchaka2016-04-241-1/+0
| | | |
* | | | Issue #23883: Add test.support.check__all__() and test gettext.__all__Martin Panter2015-11-141-0/+6
|/ / / | | | | | | | | | Patches by Jacek Kołodziej.
* | | Merge from 3.4Andrew Kuchling2015-04-141-0/+27
|\ \ \ | |/ /
| * | #17898: reset k and v so that the loop doesn't use an old valueAndrew Kuchling2015-04-131-0/+27
| | |
* | | Issue #18216: gettext now raises an error when a .mo file has an unsupported ↵Antoine Pitrou2014-10-281-0/+70
|/ / | | | | | | major version number. Patch by Aaron Hill.
* | test_gettext: use support.rmtree() instead of shutil.rmtree()Victor Stinner2014-07-241-1/+1
|/
* Prevent ResourceWarnings in test_gettextÉric Araujo2010-11-061-23/+12
|
* Fix caching error found by regrtest -R (#10229)Éric Araujo2010-11-061-0/+1
|
* Fix interaction of custom translation classes and caching (#9042)Éric Araujo2010-10-041-0/+31
|
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-1/+1
|
* More codestring -> codebytes.Georg Brandl2009-06-041-3/+3
|
* Merged revisions 72167 via svnmerge fromWalter Dörwald2009-05-011-6/+4
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72167 | walter.doerwald | 2009-05-01 19:35:37 +0200 (Fr, 01 Mai 2009) | 5 lines Make test.test_support.EnvironmentVarGuard behave like a dictionary. All changes are mirrored to the underlying os.environ dict, but rolled back on exit from the with block. ........
* #2512 implement the 3.0 gettext APIBenjamin Peterson2008-07-141-5/+5
| | | | | | | All the u* gettext variants were renamed to their none u* variants, since there's no point in translating to byte strings. I also killed off the unicode parameters for install
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-2/+2
|
* #1535: rename __builtin__ module to builtins.Georg Brandl2007-12-021-4/+4
|
* Fixed gettext module for Windows. The metadata lines always end in \n and ↵Christian Heimes2007-10-311-0/+1
| | | | not in os.linesep
* Changes in anticipation of stricter str vs. bytes enforcement.Guido van Rossum2007-08-271-3/+3
|
* Rip out all the u"..." literals and calls to unicode().Guido van Rossum2007-05-021-21/+21
|