code: def test_readline_psfile(tmp_path):
      # check all the freaking line endings possible from the spec
      # test_string = u'something\r\nelse\n\rbaz\rbif\n'
      line_endings = ["\r\n", "\n", "\n\r", "\r"]
      strings = ["something", "else", "baz", "bif"]
  
      def _test_readline(t, ending):
          ending = "Failure with line ending: %s" % (
              "".join("%s" % ord(s) for s in ending)
          )
          assert t.readline().strip("\r\n") == "something", ending
          assert t.readline().strip("\r\n") == "else", ending
          assert t.readline().strip("\r\n") == "baz", ending
          assert t.readline().strip("\r\n") == "bif", ending
  
      def _test_readline_io_psfile(test_string, ending):
          f = io.BytesIO(test_string.encode("latin-1"))
          with pytest.warns(DeprecationWarning):
              t = EpsImagePlugin.PSFile(f)
          _test_readline(t, ending)
  
      def _test_readline_file_psfile(test_string, ending):
          f = str(tmp_path / "temp.txt")
          with open(f, "wb") as w:
              w.write(test_string.encode("latin-1"))
  
          with open(f, "rb") as r:
              with pytest.warns(DeprecationWarning):
                  t = EpsImagePlugin.PSFile(r)
              _test_readline(t, ending)
  
      for ending in line_endings:
          s = ending.join(strings)
          _test_readline_io_psfile(s, ending)
          _test_readline_file_psfile(s, ending)
  
imports: from __future__ import annotations
  import io
  import pytest
  from PIL import EpsImagePlugin, Image, features
  from .helper import assert_image_similar, assert_image_similar_tofile, hopper, is_win32, mark_if_feature_version, skip_unless_feature
label_desc: Use image node_id 25 for calling a global function with example usage: test_readline_psfile(tmp_path) without return types