blob: ae61af963c29fb567a3b2b4fa1e2b31bfeb3c593 [file] [log] [blame]
Raymond Hettingerf9f4c692003-08-30 22:54:55 +00001#! -*- coding: koi8-r -*-
Martin v. Löwisf7e74b72004-10-13 05:29:39 +00002# This file is marked as binary in the CVS, to prevent MacCVS from recoding it.
Raymond Hettingerf9f4c692003-08-30 22:54:55 +00003
4import unittest
5from test import test_support
6
7class PEP263Test(unittest.TestCase):
8
9 def test_pep263(self):
10 self.assertEqual(
Guido van Rossumef87d6e2007-05-02 19:09:54 +000011 "ðÉÔÏÎ".encode("utf-8"),
Raymond Hettingerf9f4c692003-08-30 22:54:55 +000012 '\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd'
13 )
14 self.assertEqual(
Guido van Rossumef87d6e2007-05-02 19:09:54 +000015 "\ð".encode("utf-8"),
Raymond Hettingerf9f4c692003-08-30 22:54:55 +000016 '\\\xd0\x9f'
17 )
18
19def test_main():
20 test_support.run_unittest(PEP263Test)
21
22if __name__=="__main__":
23 test_main()