File indexing completed on 2024-09-08 05:10:01
0001 import pytest 0002 0003 from pology.markup import _escape_amp_accel, xml_to_plain 0004 0005 @pytest.mark.parametrize( 0006 "input,output", 0007 ( 0008 # Digits and Unicode letters can work as accelerator characters. 0009 ("Choice &1", "Choice &1"), 0010 ("&save", "&save"), 0011 ("&Save", "&Save"), 0012 ("&Პარამეტრი:", "&Პარამეტრი:"), 0013 0014 # Symbols and Unicode letters cannot work as accelerator characters. 0015 ("Choose&:", "Choose&:"), 0016 ), 0017 ) 0018 def test_escape_amp_accel(input, output): 0019 assert _escape_amp_accel(input) == output 0020 0021 0022 @pytest.mark.parametrize( 0023 "input,output", 0024 ( 0025 ("Søk\xa0…", "Søk\xa0…"), 0026 ), 0027 ) 0028 def test_xml_to_plain(input, output): 0029 assert xml_to_plain(input) == output