Raymond Hettinger | f9f4c69 | 2003-08-30 22:54:55 +0000 | [diff] [blame^] | 1 | #! -*- coding: koi8-r -*- |
2 | |||||
3 | import unittest | ||||
4 | from test import test_support | ||||
5 | |||||
6 | class PEP263Test(unittest.TestCase): | ||||
7 | |||||
8 | def test_pep263(self): | ||||
9 | self.assertEqual( | ||||
10 | u"ðÉÔÏÎ".encode("utf-8"), | ||||
11 | '\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd' | ||||
12 | ) | ||||
13 | self.assertEqual( | ||||
14 | u"\ð".encode("utf-8"), | ||||
15 | '\\\xd0\x9f' | ||||
16 | ) | ||||
17 | |||||
18 | def test_main(): | ||||
19 | test_support.run_unittest(PEP263Test) | ||||
20 | |||||
21 | if __name__=="__main__": | ||||
22 | test_main() |