bpo-42864: Improve error messages regarding unclosed parentheses (GH-24161)

diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index 2f6716d..0be869e 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -260,7 +260,7 @@ def test_eof_error(self):
         for s in samples:
             with self.assertRaises(SyntaxError) as cm:
                 compile(s, "<test>", "exec")
-            self.assertIn("unexpected EOF", str(cm.exception))
+            self.assertIn("was never closed", str(cm.exception))
 
 var_annot_global: int # a global annotated is necessary for test_var_annot