class_docstr: Test Public Streamlit Public APIs.
class_docstr_tok: ["Test","Public","Streamlit","Public","APIs","."]
docstr: Test st.exception.
docstr_tok: ["Test","st.exception","."]
code: def test_st_exception(self, show_error_details: bool):
      """Test st.exception."""
      # client.showErrorDetails has no effect on code that calls
      # st.exception directly. This test should have the same result
      # regardless fo the config option.
      with testutil.patch_config_options(
          {"client.showErrorDetails": show_error_details}
      ):
          e = RuntimeError("Test Exception")
          st.exception(e)
  
          el = self.get_delta_from_queue().new_element
          self.assertEqual(el.exception.type, "RuntimeError")
          self.assertEqual(el.exception.message, "Test Exception")
          # We will test stack_trace when testing
          # streamlit.elements.exception_element
          self.assertEqual(el.exception.stack_trace, [])
  
imports: import os
  import unittest
  from parameterized import parameterized
  import streamlit
  from streamlit import errors
  from streamlit.elements import exception
  from streamlit.elements.exception import _GENERIC_UNCAUGHT_EXCEPTION_TEXT, _format_syntax_error_message
  from streamlit.errors import StreamlitAPIException, UncaughtAppException
  from streamlit.proto.Exception_pb2 import Exception
  from tests import testutil
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 1 for calling the StExceptionAPITest obj's underlying member method code with example usage: obj.test_st_exception(show_error_details) without return types