docstr: show_deprecation_warning logs warnings always, and prints to the browser only
  if config.client.showErrorDetails is True.
docstr_tok: ["show_deprecation_warning","logs","warnings","always",",","and","prints","to","the","browser","only","if","config.client.showErrorDetails","is","True","."]
code: def test_show_deprecation_warning(
      self, mock_warning: Mock, mock_logger: Mock
  ):
      """show_deprecation_warning logs warnings always, and prints to the browser only
      if config.client.showErrorDetails is True.
      """
      message = (
          "We regret the bother, but it's been fated:\n"
          "the function you called is DEPRECATED."
      )
  
      # config.client.showErrorDetails=True: log AND show in browser
      with patch_config_options({"client.showErrorDetails": True}):
          show_deprecation_warning(message)
          mock_logger.warning.assert_called_once_with(message)
          mock_warning.assert_called_once_with(message)
  
      mock_logger.reset_mock()
      mock_warning.reset_mock()
  
      # config.client.showErrorDetails=False: log, but DON'T show in browser
      with patch_config_options({"client.showErrorDetails": False}):
          show_deprecation_warning(message)
          mock_logger.warning.assert_called_once_with(message)
          mock_warning.assert_not_called()
  
file_path: streamlit/lib/tests/streamlit/deprecation_util_test.py
imports: import unittest
  from unittest.mock import Mock, patch
  from streamlit.deprecation_util import deprecate_func_name, deprecate_obj_name, show_deprecation_warning
  from tests.testutil import patch_config_options
label_desc: Use image node_id 1 for calling the DeprecationUtilTest obj's underlying member method code with example usage: obj.test_show_deprecation_warning(mock_warning, mock_logger) without return types