class_docstr: Test st.write.
  
  Unit tests for https://docs.streamlit.io/library/api-reference/write-magic/st.write
  
  Because we're going to test st.markdown, st.pyplot, st.altair_chart
  later on, we don't have to test it in st.write In st.write, all we're
  trying to check is that the right st.* method gets called
class_docstr_tok: ["Test","st.write",".","Unit","tests","for","https",":","\/\/docs.streamlit.io\/library\/api-reference\/write-magic\/st.write","Because","we","'re","going","to","test","st.markdown",",","st.pyplot",",","st.altair_chart","later","on",",","we","do","n't","have","to","test","it","in","st.write","In","st.write",",","all","we're","trying","to","check","is","that","the","right","st.","*","method","gets","called"]
docstr: Test st.write with exception.
code: def test_exception_type(self):
      """Test st.write with exception."""
      with patch(
          "streamlit.delta_generator.DeltaGenerator.exception"
      ) as p:
          st.write(Exception("some exception"))
  
          p.assert_called_once()
  
imports: import dataclasses
  import time
  import unittest
  from collections import namedtuple
  from unittest.mock import Mock, PropertyMock, call, patch
  import numpy
  import pandas
  import pytest
  import streamlit
  from streamlit import type_util
  from streamlit.elements import write
  from streamlit.error_util import handle_uncaught_app_exception
  from streamlit.errors import StreamlitAPIException
  from streamlit.runtime.state import QueryParamsProxy, SessionStateProxy
label_desc: Use image node_id 5 for calling the StreamlitWriteTest obj's underlying member method code with example usage: obj.test_exception_type() without return types