fix: Make doctests locale-independent (#390) (#391)

This commit is contained in:
1cu
2025-01-27 09:22:15 +01:00
committed by GitHub
parent f01109c956
commit fa0d43efa8

View File

@@ -153,6 +153,7 @@ def set_current_locale(new_locale:Locale) -> None:
def pluralize(noun:str, count:int | Sized, prefix_with_count:bool = True) -> str: def pluralize(noun:str, count:int | Sized, prefix_with_count:bool = True) -> str:
""" """
>>> set_current_locale(Locale("en")) # Setup for doctests
>>> pluralize("field", 1) >>> pluralize("field", 1)
'1 field' '1 field'
>>> pluralize("field", 2) >>> pluralize("field", 2)