summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add test for #942Aarni Koskela2023-01-201-0/+4
|
* Enable E741 (ambiguous variable name) lintAarni Koskela2023-01-183-39/+39
|
* Apply some small miscellaneous formatting fixesAarni Koskela2023-01-186-34/+36
|
* Apply ruff UP025 (unicode literal prefix) fixAarni Koskela2023-01-1813-420/+420
|
* Apply ruff SIM300 (de-yoda) fixesAarni Koskela2023-01-181-5/+4
|
* Apply ruff I category fixesAarni Koskela2023-01-1815-27/+49
|
* Apply ruff E category fixesAarni Koskela2023-01-184-13/+14
|
* Apply ruff C category fixesAarni Koskela2023-01-181-15/+9
|
* Renovate formatting in test_checkers and test_frontend (#950)Aarni Koskela2023-01-182-204/+147
|
* Minor cleanups (#948)Aarni Koskela2023-01-185-35/+31
| | | | | * Add __all__s to be cleaner about re-exports * Move timezone_getter to conftest * Apply spelling corrections suggested by codespell
* Implement zoneinfo support and make pytz optional (#940)DS/Charlie2023-01-113-93/+108
|
* Fix compact singular formats and patterns with no numbers (#932)Jonah Lawrence2023-01-061-1/+6
|
* Improved javascript template string expression extracting (#939)Johannes Wilm2023-01-061-0/+39
| | | | Co-authored-by: Rik <gitaarik@posteo.net> Co-authored-by: Aarni Koskela <akx@iki.fi>
* Replace %/.format/concatenation with f-strings where feasible (#927)Aarni Koskela2022-11-236-16/+17
| | | Original conversion suggestions via flynt, edited by hand.
* feat: Support for short compact currency formats (#926)Jonah Lawrence2022-11-042-0/+34
| | | | Co-authored-by: Jun Omae (大前 潤) <42682+jun66j5@users.noreply.github.com>
* feat: Add `Format.compact_decimal` utility (#921)Jonah Lawrence2022-11-021-0/+5
|
* Quiesce pytest warnings (#916)Aarni Koskela2022-11-011-1/+1
| | | | | | | * Skip doctest of deprecated format_number * Don't return from test_compatible_classes_in_global_and_localedata * Renovate conftest (and require pytest 6+)
* Use `ast` instead of `eval` for string extractionAarni Koskela2022-11-011-0/+27
| | | | | | | | This is safer (as we don't actually execute anything), and allows us to parse f-strings too. Closes #769 (supersedes it) Refs #715 (doesn't add an error yet, but doesn't crash on f-strings)
* Add support for compact decimal formats (#909)Jonah Lawrence2022-10-311-0/+33
|
* Support for hex escapes in JavaScript string literalsPrzemyslaw Wegrzyn2022-10-311-0/+2
|
* Use email.Message for pofile header parsingAarni Koskela2022-05-101-0/+11
| | | | | | cgi.parse_header is due to be deprecated Fixes #873
* tests: Use pytest.raises() decorator where applicableAarni Koskela2022-05-102-19/+17
|
* tests: Use regular asserts instead of unittest functionsAarni Koskela2022-05-1010-879/+639
| | | | | | Automated conversion initially applied with https://github.com/warlo/codemod-unittest-to-pytest-asserts, followed by some manual changes for brevity.
* Merge pull request #869 from jun66j5/date-period-symbolsAarni Koskela2022-05-101-1/+1
|\ | | | | Add support for `b` and `B` period symbols in time format
| * Add support for `b` and `B` period symbols in time formatJun Omae2022-04-291-1/+1
| |
* | Fix up some Python2-isms using pyupgradeAarni Koskela2022-05-1021-28/+4
| |
* | Fix get_period_id() with `dayPeriodRule` across 0:00Jun Omae2022-05-101-0/+3
| |
* | Fallback count="other" format in format_currency()Jun Omae2022-05-101-0/+6
|/
* Add test for issue 798Aarni Koskela2022-04-201-0/+4
|
* allow header_comment to be passed as an option to extract_message (#720)Mohamed Morsy2022-04-121-0/+9
| | | | | Fixes #82 Co-authored-by: Aarni Koskela <akx@iki.fi>
* Update tests for CLDR 41Aarni Koskela2022-04-081-1/+1
|
* Provide a way of checking if the catalogs are up-to-date (#831)Krzysztof Jagiełło2022-04-081-1/+59
|
* Fix output of --list-locales to not be a bytes reprMorgan Wahl2022-04-081-0/+11
| | | | Co-authored-by: Aarni Koskela <akx@iki.fi>
* Make test_smoke more thoroughAarni Koskela2022-04-081-13/+32
|
* plural: parse new c, e operands (otherwise unsupported though)Aarni Koskela2022-04-081-1/+3
|
* Adjust tests for CLDR 40 dataAarni Koskela2022-04-082-5/+5
|
* Plural-Forms: Fix missing trailing semicolonfarhan59002022-04-0810-29/+29
| | | | | | | | Adds missing semicolon in the code that generates the header that is Catalog.plural_forms as well as in plural.to_gettext function. Also modifies all the concerning test cases as well as test data files. Closes https://github.com/python-babel/babel/issues/836
* Prefer setuptools imports to distutils importsAarni Koskela2022-04-081-17/+12
| | | | | | | The non-conditional imports have been around for 6 to 17 years, so they should be safe in conservative situations too. Refs #824
* Fix duplicate locations when writing without linenoSigurd Ljødal2022-04-081-0/+1
| | | | | | If the same translation appears multiple times in the same file, duplicate locations would be written to the .po file when using write_po(..., include_lineno=False).
* Don't use the deprecated format_number function internally or in testsAarni Koskela2022-02-041-5/+2
|
* Merge pull request #834 from akx/improve-date-parseAarni Koskela2022-01-281-4/+31
|\ | | | | Improve date/time parsing
| * Add format argument to parse_*Juliette Monsel2022-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ``parse_date()`` does not allow the user to specify the date's format and the 'medium' format is used by default in the call to ``get_date_format()`` on line 1144. This results in a failure to parse the date in short format for the locale 'sv_SE'. This commit adds the format argument to avoid this failure. The default value is set to 'medium' to preserve the old behavior. Fixes #657 Co-authored-by: Aarni Koskela <akx@iki.fi>
| * Add and emit dates.ParseErrorAarni Koskela2022-01-281-0/+7
| |
| * Improve partial time parsingAarni Koskela2022-01-281-2/+21
| | | | | | | | | | | | | | Refs #442 Co-authored-by: David Bauer <david.bauer009@gmail.com> Co-authored-by: Arthur Jovart <arthur@jovart.com>
* | Add frontend for extract directory filterAarni Koskela2022-01-272-0/+28
|/ | | | Co-authored-by: Kinshuk Dua <kinshukduaexam@gmail.com>
* parse_locale(): upper-case variant tag to match file systemAarni Koskela2022-01-271-0/+6
| | | | | | | | | At all times, language tags and their subtags, including private use and extensions, are to be treated as case insensitive: there exist conventions for the capitalization of some of the subtags, but these MUST NOT be taken to carry meaning. Fixes #814
* Date intervals: allow using `other` as fallback formAarni Koskela2022-01-251-0/+10
| | | | Fixes #825
* Update copyright year to 2022Aarni Koskela2022-01-2514-14/+14
|
* Hack around empty `err` in test_extract_error_code testAarni Koskela2022-01-251-2/+3
|
* Remove redundant _compat.pyHugo van Kemenade2021-09-1413-50/+39
|