summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_coding.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2005-12-18 05:29:30 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2005-12-18 05:29:30 (GMT)
commitdb83eb3170ebdf55bd1c1add94838a9aefa8c00b (patch)
tree7920aeced87b5649ef95344d093c2d6fb6cf5b68 /Lib/test/test_coding.py
parente7214a130b3fb1c4850a1e644b9e240087f6e982 (diff)
downloadcpython-db83eb3170ebdf55bd1c1add94838a9aefa8c00b.zip
cpython-db83eb3170ebdf55bd1c1add94838a9aefa8c00b.tar.gz
cpython-db83eb3170ebdf55bd1c1add94838a9aefa8c00b.tar.bz2
Fix Bug #1378022, UTF-8 files with a leading BOM crashed the interpreter.
Needs backport.
Diffstat (limited to 'Lib/test/test_coding.py')
-rw-r--r--Lib/test/test_coding.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_coding.py b/Lib/test/test_coding.py
index aa7241d..e83015e 100644
--- a/Lib/test/test_coding.py
+++ b/Lib/test/test_coding.py
@@ -5,6 +5,13 @@ import os
class CodingTest(unittest.TestCase):
def test_bad_coding(self):
module_name = 'bad_coding'
+ self.verify_bad_module(module_name)
+
+ def test_bad_coding2(self):
+ module_name = 'bad_coding2'
+ self.verify_bad_module(module_name)
+
+ def verify_bad_module(self, module_name):
self.assertRaises(SyntaxError, __import__, 'test.' + module_name)
path = os.path.dirname(__file__)