コード例 #1
0
ファイル: iutil_test.py プロジェクト: heysion/anaconda
    def to_ascii_test(self):
        """Test _toASCII."""

        # check some conversions
        self.assertEqual(util._toASCII(""), "")
        self.assertEqual(util._toASCII(" "), " ")
        self.assertEqual(util._toASCII("&@`'łŁ!@#$%^&*{}[]$'<>*"),
                         "&@`'!@#$%^&*{}[]$'<>*")
        self.assertEqual(util._toASCII("ABC"), "ABC")
        self.assertEqual(util._toASCII("aBC"), "aBC")
        _out = "Heizolruckstoabdampfung"
        self.assertEqual(util._toASCII("Heizölrückstoßabdämpfung"), _out)
コード例 #2
0
    def test_to_ascii(self):
        """Test _toASCII."""

        # check some conversions
        assert util._toASCII("") == ""
        assert util._toASCII(" ") == " "
        assert util._toASCII("&@`'łŁ!@#$%^&*{}[]$'<>*") == \
            "&@`'!@#$%^&*{}[]$'<>*"
        assert util._toASCII("ABC") == "ABC"
        assert util._toASCII("aBC") == "aBC"
        _out = "Heizolruckstoabdampfung"
        assert util._toASCII("Heizölrückstoßabdämpfung") == _out
コード例 #3
0
ファイル: iutil_test.py プロジェクト: rvykydal/anaconda
    def to_ascii_test(self):
        """Test _toASCII."""

        # check some conversions
        self.assertEqual(util._toASCII(""), "")
        self.assertEqual(util._toASCII(" "), " ")
        self.assertEqual(util._toASCII("&@`'łŁ!@#$%^&*{}[]$'<>*"),
                         "&@`'!@#$%^&*{}[]$'<>*")
        self.assertEqual(util._toASCII("ABC"), "ABC")
        self.assertEqual(util._toASCII("aBC"), "aBC")
        _out = "Heizolruckstoabdampfung"
        self.assertEqual(util._toASCII("Heizölrückstoßabdämpfung"), _out)