summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pep3120.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2016-09-09 19:55:37 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2016-09-09 19:55:37 (GMT)
commit724f6a67f241f39394b15c419570920ebdfefacb (patch)
treedc795f9edbd8de67b4ad14fb4ed2ec45f9481ae2 /Lib/test/test_pep3120.py
parenta0154c0f0ee38b1b8a05eac181a35c78ca1508f4 (diff)
downloadcpython-724f6a67f241f39394b15c419570920ebdfefacb.zip
cpython-724f6a67f241f39394b15c419570920ebdfefacb.tar.gz
cpython-724f6a67f241f39394b15c419570920ebdfefacb.tar.bz2
Rename test_pep####.py files
Diffstat (limited to 'Lib/test/test_pep3120.py')
-rw-r--r--Lib/test/test_pep3120.py43
1 files changed, 0 insertions, 43 deletions
diff --git a/Lib/test/test_pep3120.py b/Lib/test/test_pep3120.py
deleted file mode 100644
index 97dced8..0000000
--- a/Lib/test/test_pep3120.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# This file is marked as binary in the CVS, to prevent MacCVS from recoding it.
-
-import unittest
-
-class PEP3120Test(unittest.TestCase):
-
- def test_pep3120(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_badsyntax(self):
- try:
- import test.badsyntax_pep3120
- except SyntaxError as msg:
- msg = str(msg).lower()
- self.assertTrue('utf-8' in msg)
- else:
- self.fail("expected exception didn't occur")
-
-
-class BuiltinCompileTests(unittest.TestCase):
-
- # Issue 3574.
- def test_latin1(self):
- # Allow compile() to read Latin-1 source.
- source_code = '# coding: Latin-1\nu = "Ç"\n'.encode("Latin-1")
- try:
- code = compile(source_code, '<dummy>', 'exec')
- except SyntaxError:
- self.fail("compile() cannot handle Latin-1 source")
- ns = {}
- exec(code, ns)
- self.assertEqual('Ç', ns['u'])
-
-
-if __name__ == "__main__":
- unittest.main()