-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use CLDR 46 * Update checksum * Add tests for units * Add a test for alt='official' * Fix formatting
- Loading branch information
Showing
5 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import pytest | ||
|
||
from babel.units import format_unit | ||
|
||
|
||
# New units in CLDR 46 | ||
@pytest.mark.parametrize(('unit', 'count', 'expected'), [ | ||
('speed-light-speed', 1, '1 světlo'), | ||
('speed-light-speed', 2, '2 světla'), | ||
('speed-light-speed', 5, '5 světel'), | ||
('concentr-portion-per-1e9', 1, '1 částice na miliardu'), | ||
('concentr-portion-per-1e9', 2, '2 částice na miliardu'), | ||
('concentr-portion-per-1e9', 5, '5 částic na miliardu'), | ||
('duration-night', 1, '1 noc'), | ||
('duration-night', 2, '2 noci'), | ||
('duration-night', 5, '5 nocí'), | ||
]) | ||
def test_new_cldr46_units(unit, count, expected): | ||
assert format_unit(count, unit, locale='cs_CZ') == expected |