From 4795c868770163fafbde525e913b8806f71b7c0c Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Mon, 11 Apr 2016 13:45:59 +0300 Subject: [PATCH] Test that `update` actually accepts those boolean parameters --- tests/messages/test_frontend.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/messages/test_frontend.py b/tests/messages/test_frontend.py index e0c9a8eb..049fc299 100644 --- a/tests/messages/test_frontend.py +++ b/tests/messages/test_frontend.py @@ -27,7 +27,7 @@ import pytest from babel import __version__ as VERSION from babel.dates import format_datetime from babel.messages import frontend, Catalog -from babel.messages.frontend import CommandLineInterface, extract_messages +from babel.messages.frontend import CommandLineInterface, extract_messages, update_catalog from babel.util import LOCALTZ from babel.messages.pofile import read_po, write_po from babel._compat import StringIO @@ -1291,3 +1291,12 @@ def test_extract_keyword_args_384(split): 'ungettext', 'ungettext_lazy', )) + + +def test_update_catalog_boolean_args(): + cmdinst = configure_cli_command("update --no-wrap -N --ignore-obsolete --previous -i foo -o foo -l en") + assert isinstance(cmdinst, update_catalog) + assert cmdinst.no_wrap is True + assert cmdinst.no_fuzzy_matching is True + assert cmdinst.ignore_obsolete is True + assert cmdinst.previous is False # Mutually exclusive with no_fuzzy_matching -- 2.47.2