summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_locale.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] Fix typos in the Lib directory (GH-28775) (GH-28804)Christian Clauss2021-10-071-1/+1
| | | | | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>. (cherry picked from commit 745c9d9dfc1ad6fdfdf1d07420c6273ff67fa5be) Co-authored-by: Christian Clauss <cclauss@me.com>
* bpo-34311: Add locale.localize (GH-15275)Cédric Krier2021-04-121-0/+28
| | | | * Add method localize to the locale module * Update the documentation of the locale module
* bpo-37945: Fix test_locale.test_getsetlocale_issue1813() (#25110)Victor Stinner2021-03-311-1/+7
| | | Skip the test if setlocale() fails.
* bpo-40275: Use new test.support helper submodules in tests (GH-21412)Hai Shi2020-07-091-1/+2
|
* bpo-38536: locale: Remove trailing space in formatted currency (GH-16864)Inada Naoki2020-01-201-2/+1
|
* bpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename ↵Ronald Oussoren2019-08-291-0/+36
| | | | (GH-14736)
* Remove unused imports in tests (GH-14518)Victor Stinner2019-07-011-1/+1
|
* Revert "bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)" (GH-7919)Victor Stinner2018-06-261-10/+9
| | | This reverts commit 8fbbdf0c3107c3052659e166f73990b466eacbb0.
* bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)Victor Stinner2018-06-221-9/+10
| | | | | | | | * Add support.MS_WINDOWS: True if Python is running on Microsoft Windows. * Add support.MACOS: True if Python is running on Apple macOS. * Replace support.is_android with support.ANDROID * Replace support.is_jython with support.JYTHON * Cleanup code to initialize unix_shell
* bpo-20087: Update locale alias mapping with glibc 2.27 supported locales. ↵Serhiy Storchaka2018-05-061-1/+1
| | | | (ПР-6708)
* [security] bpo-13617: Reject embedded null characters in wchar* strings. (#2302)Serhiy Storchaka2017-06-281-0/+5
| | | | | | | Based on patch by Victor Stinner. Add private C API function _PyUnicode_AsUnicode() which is similar to PyUnicode_AsUnicode(), but checks for null characters.
* bpo-29972: Skip tests known to fail on AIX (#979)Victor Stinner2017-04-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | * bpo-29972: Fix test_eintr on AIX On AIX, sigtimedwait(0.2) sleeps 199.8 ms, whereas the test expects 200 ms or longer. * bpo-29972: Skip some inet_pton() tests on AIX Skip some inet_pton() tests of test_socket on AIX. inet_pton() on AIX is less strict than on Linux and doesn't reject some invalid IP addresses. The unit tests test more the libc than Python itself. * bpo-29972: Skip tests known to fail on AIX * test_locale.test_strcoll_with_diacritic() * test_locale.test_strxfrm_with_diacritic() * test_strptime.test_week_of_year_and_day_of_week_calculation() * test_tools.test_POT_Creation_Date()
* test_locale now ignores the DeprecationWarning (#977)Victor Stinner2017-04-031-11/+13
| | | | | Don't fail anymore if test run with python3 -Werror. Fix also deprecation message: add a space.
* bpo-10379: add 'monetary' to format_string, deprecate formatGarvit Khatri2017-03-281-0/+5
| | | | | | | Add the 'monetary' parameter to format_string so that all uses of format can be converted to format_string. Adjust the documentation accordingly, and add a deprecation warning when format is used.
* bpo-20087: Revert "make the glibc alias table take precedence over the X11 ↵Benjamin Peterson2017-03-201-4/+1
| | | | | one (#422)" (#713) This reverts commit 02371e0ed1ee82ec73e7d363bcf2ed40cde1397a.
* make the glibc alias table take precedence over the X11 one (#422)Benjamin Peterson2017-03-081-1/+4
| | | bpo-20087
* Issue #28996: Skip two tests that fail on Android with the locale strcoll() andXavier de Gaye2016-12-191-2/+2
| | | | strxfrm() functions.
* Issue #23474: Enhanced locale testing.Serhiy Storchaka2015-02-181-1/+1
|\
| * Issue #23474: Enhanced locale testing.Serhiy Storchaka2015-02-181-1/+1
| |
* | Issue #13918: Provide a locale.delocalize() function which can removeAntoine Pitrou2014-10-231-0/+54
|/ | | | | locale-specific number formatting from a string representing a number, without then converting it to a specific type. Patch by Cédric Krier.
* Issue #20079: Fixed tests.Serhiy Storchaka2014-10-021-1/+1
|
* Issue #20046: Locale alias table no longer contains entities which can beSerhiy Storchaka2013-12-261-0/+39
| | | | calculated. Generalized support of the euro modifier.
* Issue #20027: Fixed locale aliases for devanagari locales.Serhiy Storchaka2013-12-261-0/+14
|\
| * Issue #20027: Fixed locale aliases for devanagari locales.Serhiy Storchaka2013-12-261-0/+14
| |
| * Don't use sebTest() in tests for issue #5815.Serhiy Storchaka2013-12-191-2/+1
| |
| * Issue #5815: Fixed support for locales with modifiers. Fixed support forSerhiy Storchaka2013-12-191-0/+58
| | | | | | | | locale encodings with hyphens.
* | Issue #5815: Fixed support for locales with modifiers. Fixed support forSerhiy Storchaka2013-12-191-0/+58
|/ | | | locale encodings with hyphens.
* Issue #17767: test_locale now works with unittest test discovery.Serhiy Storchaka2013-07-171-58/+36
| | | | Original patch by Zachary Ware.
* Issue #15118: Change return value of os.uname() and os.times() fromLarry Hastings2012-06-241-1/+1
| | | | | plain tuples to immutable iterable objects with named attributes (structseq objects).
* Issue #1813: merge changeset that reverts a glibc workaround for theStefan Krah2012-02-021-3/+0
|\ | | | | | | Fedora buildbot.
| * Issue #1813: Revert workaround for a glibc bug on the Fedora buildbot.Stefan Krah2012-02-021-3/+0
| |
* | Issue #13441: Reenable strxfrm() tests on SolarisVictor Stinner2011-11-211-4/+0
| |
* | Issue #13441: Disable temporary strxfrm() tests on SolarisVictor Stinner2011-11-211-0/+4
| |
* | Issue #3067: Fix the error raised by locale.setlocale()Petri Lehtinen2011-11-041-0/+8
|\ \ | |/
| * Issue #3067: Fix the error raised by locale.setlocale()Petri Lehtinen2011-11-041-0/+8
| |
* | Merge 68b5f87566fbStefan Krah2011-08-011-0/+3
|\ \ | |/
| * Skip test_getsetlocale_issue1813() on Fedora due to setlocale() bug.Stefan Krah2011-08-011-0/+3
| | | | | | | | See: https://bugzilla.redhat.com/show_bug.cgi?id=726536
| * Backport 0398f07d4827 (fix for weird buildbot failures)Antoine Pitrou2011-07-261-3/+3
| |
* | Try to fix weird buildbot failuresAntoine Pitrou2011-07-261-3/+3
| |
* | Add debug output for failing buildbotAntoine Pitrou2011-07-261-0/+2
|/
* Add a test for issue #1813: getlocale() failing under a Turkish localeAntoine Pitrou2011-07-241-0/+13
| | | | (not a problem under 3.x)
* Issue #9868: locale was left changed after TestEnUSCollation#setUp raisedHirokazu Yamamoto2010-09-231-1/+1
| | | | TestSkip exception.
* Merged revisions 80512 via svnmerge fromR. David Murray2010-04-271-0/+20
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80512 | r.david.murray | 2010-04-26 17:17:14 -0400 (Mon, 26 Apr 2010) | 7 lines Issue #6656: fix locale.format_string to handle escaped percents and mappings. Refactors format_string. Includes tests for the two problems noted in the issue, but as far as I can see there are no other tests that confirm that format_string conforms to normal % formatting rules. ........
* Merged revisions 80178 via svnmerge fromRonald Oussoren2010-04-181-1/+9
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80178 | ronald.oussoren | 2010-04-18 15:47:49 +0200 (Sun, 18 Apr 2010) | 2 lines Fix for issue #7072 ........
* Merged revisions 76625 via svnmerge fromAmaury Forgeot d'Arc2009-12-011-0/+11
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76625 | amaury.forgeotdarc | 2009-12-01 22:51:04 +0100 (mar., 01 déc. 2009) | 3 lines #7419: Fix a crash on Windows in locale.setlocale() when the category is outside the allowed range. ........
* Issue #7080: locale.strxfrm() raises a MemoryError on 64-bit non-WindowsAntoine Pitrou2009-10-191-9/+40
| | | | platforms, and assorted locale fixes by Derk Drukker.
* Merged revisions 70936 via svnmerge fromR. David Murray2009-04-011-0/+14
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70936 | r.david.murray | 2009-03-31 23:21:43 -0400 (Tue, 31 Mar 2009) | 4 lines Fix issue 2522. locale.format now checks that it is passed exactly one pattern, which avoids mysterious errors where it had seemed to fail to do localization. ........
* Merged revisions ↵Benjamin Peterson2009-03-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 70554,70588-70589,70598,70605,70611-70621,70623-70624,70626-70627 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70554 | benjamin.peterson | 2009-03-23 16:25:15 -0500 (Mon, 23 Mar 2009) | 1 line complain when there's no last exception ........ r70588 | benjamin.peterson | 2009-03-24 17:56:32 -0500 (Tue, 24 Mar 2009) | 1 line fix newline issue in test summary ........ r70589 | benjamin.peterson | 2009-03-24 18:07:07 -0500 (Tue, 24 Mar 2009) | 1 line another style nit ........ r70598 | benjamin.peterson | 2009-03-25 16:24:04 -0500 (Wed, 25 Mar 2009) | 1 line add shorthands for expected failures and unexpected success ........ r70605 | benjamin.peterson | 2009-03-26 11:32:23 -0500 (Thu, 26 Mar 2009) | 1 line remove uneeded function ........ r70611 | benjamin.peterson | 2009-03-26 13:35:37 -0500 (Thu, 26 Mar 2009) | 1 line add much better tests for python version information parsing ........ r70612 | benjamin.peterson | 2009-03-26 13:55:48 -0500 (Thu, 26 Mar 2009) | 1 line more and more implementations now support sys.subversion ........ r70613 | benjamin.peterson | 2009-03-26 13:58:30 -0500 (Thu, 26 Mar 2009) | 1 line roll old test in with new one ........ r70614 | benjamin.peterson | 2009-03-26 14:09:21 -0500 (Thu, 26 Mar 2009) | 1 line add support for PyPy ........ r70615 | benjamin.peterson | 2009-03-26 14:58:18 -0500 (Thu, 26 Mar 2009) | 5 lines add some useful utilities for skipping tests with unittest's new skipping ability most significantly apply a modified portion of the patch from #4242 with patches for skipping implementation details ........ r70616 | benjamin.peterson | 2009-03-26 15:05:50 -0500 (Thu, 26 Mar 2009) | 1 line rename TestCase.skip() to skipTest() because it causes annoying problems with trial #5571 ........ r70617 | benjamin.peterson | 2009-03-26 15:17:27 -0500 (Thu, 26 Mar 2009) | 1 line apply the second part of #4242's patch; classify all the implementation details in test_descr ........ r70618 | benjamin.peterson | 2009-03-26 15:48:25 -0500 (Thu, 26 Mar 2009) | 1 line remove test_support.TestSkipped and just use unittest.SkipTest ........ r70619 | benjamin.peterson | 2009-03-26 15:49:40 -0500 (Thu, 26 Mar 2009) | 1 line fix naming ........ r70620 | benjamin.peterson | 2009-03-26 16:10:30 -0500 (Thu, 26 Mar 2009) | 1 line fix incorrect auto-translation of TestSkipped -> unittest.SkipTest ........ r70621 | benjamin.peterson | 2009-03-26 16:11:16 -0500 (Thu, 26 Mar 2009) | 1 line must pass argument to get expected behavior ;) ........ r70623 | benjamin.peterson | 2009-03-26 16:30:10 -0500 (Thu, 26 Mar 2009) | 1 line add missing import ........ r70624 | benjamin.peterson | 2009-03-26 16:30:54 -0500 (Thu, 26 Mar 2009) | 1 line ** is required here ........ r70626 | benjamin.peterson | 2009-03-26 16:40:29 -0500 (Thu, 26 Mar 2009) | 1 line update email tests to use SkipTest ........ r70627 | benjamin.peterson | 2009-03-26 16:44:43 -0500 (Thu, 26 Mar 2009) | 1 line fix another name ........
* Merged revisions 70356 via svnmerge fromAntoine Pitrou2009-03-141-1/+77
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70356 | antoine.pitrou | 2009-03-14 01:07:21 +0100 (sam., 14 mars 2009) | 3 lines Issue #1222: locale.format() bug when the thousands separator is a space character. ........
* Merged revisions 65244-65245,65248 via svnmerge fromAntoine Pitrou2008-07-261-30/+57
| | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65244 | antoine.pitrou | 2008-07-26 12:29:43 +0200 (sam., 26 juil. 2008) | 3 lines try to fix most buildbot failures on test_locale + add a debug output for the solaris buildbot ........ r65245 | antoine.pitrou | 2008-07-26 13:56:37 +0200 (sam., 26 juil. 2008) | 3 lines Fix more buildbot failures on test_locale. ........ r65248 | antoine.pitrou | 2008-07-26 15:49:13 +0200 (sam., 26 juil. 2008) | 4 lines disable some failing tests in test_locale due to a bug in locale.py. this should fix the failures on the solaris buildbot. ........