docstr: Ensure tok_nextc() does not add too many ending newlines.
docstr_tok: ["Ensure","tok_nextc","(",")","does","not","add","too","many","ending","newlines","."]
code: def test_line_continuation_EOF_from_file_bpo2180(self):
      """Ensure tok_nextc() does not add too many ending newlines."""
      with os_helper.temp_dir() as temp_dir:
          file_name = script_helper.make_script(temp_dir, "foo", "\\")
          rc, out, err = script_helper.assert_python_failure(file_name)
          self.assertIn(b"unexpected EOF while parsing", err)
          self.assertIn(b"line 1", err)
          self.assertIn(b"\\", err)
  
          file_name = script_helper.make_script(
              temp_dir, "foo", "y = 6\\"
          )
          rc, out, err = script_helper.assert_python_failure(file_name)
          self.assertIn(b"unexpected EOF while parsing", err)
          self.assertIn(b"line 1", err)
          self.assertIn(b"y = 6\\", err)
  
file_path: cpython/Lib/test/test_eof.py
imports: import sys
  from test import support
  from test.support import os_helper
  from test.support import script_helper
  from test.support import warnings_helper
  import unittest
label_desc: Use image node_id 6 for calling the EOFTestCase obj's underlying member method code with example usage: obj.test_line_continuation_EOF_from_file_bpo2180() without return types