code: def test_readline_rstripped_deprecation():
      with unittest.mock.patch(
          "datalad.cmd.warnings.warn"
      ) as warn_mock:
  
          class StdoutMock:
              def readline(self):
                  return "abc\n"
  
          readline_rstripped(StdoutMock())
          warn_mock.assert_called_once()
  
file_path: datalad/datalad/tests/test_cmd.py
imports: import sys
  import unittest.mock
  from subprocess import TimeoutExpired
  import pytest
  from datalad.cmd import BatchedCommand, readline_rstripped
  from datalad.cmd import BatchedCommandError
  from datalad.runner.tests.utils import py2cmd
  from datalad.tests.utils_pytest import assert_equal, assert_is_none, assert_is_not_none, assert_not_equal, assert_true
label_desc: Use image node_id 1 for calling a global function with example usage: test_readline_rstripped_deprecation() and returns: str