]> granicus.if.org Git - python/commitdiff
Merged revisions 69617 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Sat, 14 Feb 2009 17:00:16 +0000 (17:00 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 14 Feb 2009 17:00:16 +0000 (17:00 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69617 | benjamin.peterson | 2009-02-14 10:51:03 -0600 (Sat, 14 Feb 2009) | 1 line

  we're no longer using CVS, so this doesn't have to be binary
........

Lib/test/test_pep263.py

index 17abbd807a01cd3a0a7c6bef8cff54b269aadab3..106b3abc1ccab0b1a51529cfbc83e80fb73ebeef 100644 (file)
@@ -1,38 +1,37 @@
-#! -*- coding: koi8-r -*-\r
-# This file is marked as binary in the CVS, to prevent MacCVS from recoding it.\r
-\r
-import unittest\r
-from test import support\r
-\r
-class PEP263Test(unittest.TestCase):\r
-\r
-    def test_pep263(self):\r
-        self.assertEqual(\r
-            "ðÉÔÏÎ".encode("utf-8"),\r
-            b'\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd'\r
-        )\r
-        self.assertEqual(\r
-            "\ð".encode("utf-8"),\r
-            b'\\\xd0\x9f'\r
-        )\r
-\r
-    def test_compilestring(self):\r
-        # see #1882\r
-        c = compile(b"\n# coding: utf-8\nu = '\xc3\xb3'\n", "dummy", "exec")\r
-        d = {}\r
-        exec(c, d)\r
-        self.assertEqual(d['u'], '\xf3')\r
-\r
-    def test_issue2301(self):\r
-        try:\r
-            compile(b"# coding: cp932\nprint '\x94\x4e'", "dummy", "exec")\r
-        except SyntaxError as v:\r
-            self.assertEquals(v.text, "print '\u5e74'")\r
-        else:\r
-            self.fail()\r
-\r
-def test_main():\r
-    support.run_unittest(PEP263Test)\r
-\r
-if __name__=="__main__":\r
-    test_main()\r
+#! -*- coding: koi8-r -*-
+
+import unittest
+from test import support
+
+class PEP263Test(unittest.TestCase):
+
+    def test_pep263(self):
+        self.assertEqual(
+            "ðÉÔÏÎ".encode("utf-8"),
+            b'\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd'
+        )
+        self.assertEqual(
+            "\ð".encode("utf-8"),
+            b'\\\xd0\x9f'
+        )
+
+    def test_compilestring(self):
+        # see #1882
+        c = compile(b"\n# coding: utf-8\nu = '\xc3\xb3'\n", "dummy", "exec")
+        d = {}
+        exec(c, d)
+        self.assertEqual(d['u'], '\xf3')
+
+    def test_issue2301(self):
+        try:
+            compile(b"# coding: cp932\nprint '\x94\x4e'", "dummy", "exec")
+        except SyntaxError as v:
+            self.assertEquals(v.text, "print '\u5e74'")
+        else:
+            self.fail()
+
+def test_main():
+    support.run_unittest(PEP263Test)
+
+if __name__=="__main__":
+    test_main()