diff options
author | Morgan Wahl <morgan@addgene.org> | 2022-02-25 19:08:12 -0500 |
---|---|---|
committer | Aarni Koskela <akx@iki.fi> | 2022-04-08 16:21:57 +0300 |
commit | 8ef344d9bfabee9bb92d1a87da1f238feef2a380 (patch) | |
tree | 28676d52a4d58f426fa17f0ce2489f4d13fb8ee0 /tests | |
parent | 1b21b57d8fc64484f0fbf970adebed3315078dae (diff) | |
download | babel-8ef344d9bfabee9bb92d1a87da1f238feef2a380.tar.gz |
Fix output of --list-locales to not be a bytes repr
Co-authored-by: Aarni Koskela <akx@iki.fi>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/messages/test_frontend.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/messages/test_frontend.py b/tests/messages/test_frontend.py index f8a58dd..40afab7 100644 --- a/tests/messages/test_frontend.py +++ b/tests/messages/test_frontend.py @@ -756,6 +756,17 @@ usage: pybabel command [options] [args] pybabel: error: no valid command or option passed. try the -h/--help option for more information. """, sys.stderr.getvalue().lower()) + def test_list_locales(self): + """ + Test the command with the --list-locales arg. + """ + result = self.cli.run(sys.argv + ['--list-locales']) + assert not result + output = sys.stdout.getvalue() + assert 'fr_CH' in output + assert 'French (Switzerland)' in output + assert "\nb'" not in output # No bytes repr markers in output + def _run_init_catalog(self): i18n_dir = os.path.join(data_dir, 'project', 'i18n') pot_path = os.path.join(data_dir, 'project', 'i18n', 'messages.pot') |