SF patch# 1755885 by Kurt Kaiser: show location of Unicode escape errors.
(Slightly tweaked for style and refcounts.)
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index 4bd2943..fd28610 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -474,6 +474,12 @@
         st = parser.suite('1 = 3 + 4')
         self.assertRaises(SyntaxError, parser.compilest, st)
 
+    def test_compile_badunicode(self):
+        st = parser.suite('a = u"\U12345678"')
+        self.assertRaises(SyntaxError, parser.compilest, st)
+        st = parser.suite('a = u"\u1"')
+        self.assertRaises(SyntaxError, parser.compilest, st)
+
 def test_main():
     test_support.run_unittest(
         RoundtripLegalSyntaxTestCase,