complain if the codec doesn't return unicode
diff --git a/Lib/test/test_pep263.py b/Lib/test/test_pep263.py
index 4b60624..a3abc3c 100644
--- a/Lib/test/test_pep263.py
+++ b/Lib/test/test_pep263.py
@@ -58,6 +58,11 @@
with self.assertRaisesRegexp(SyntaxError, 'BOM'):
compile('\xef\xbb\xbf# -*- coding: fake -*-\n', 'dummy', 'exec')
+ def test_non_unicode_codec(self):
+ with self.assertRaisesRegexp(SyntaxError,
+ 'codec did not return a unicode'):
+ from test import bad_coding3
+
def test_main():
test_support.run_unittest(PEP263Test)