class_docstr: Test UserInfoProxy.
class_docstr_tok: ["Test","UserInfoProxy","."]
docstr: Test that st.user reads information from current ScriptRunContext
  And after ScriptRunContext changed, it returns new email
docstr_tok: ["Test","that","st.user","reads","information","from","current","ScriptRunContext","And","after","ScriptRunContext","changed",",","it","returns","new","email"]
code: def test_st_user_reads_from_context_(self):
      """Test that st.user reads information from current ScriptRunContext
      And after ScriptRunContext changed, it returns new email
      """
      orig_report_ctx = get_script_run_ctx()
  
      forward_msg_queue = ForwardMsgQueue()
  
      try:
          add_script_run_ctx(
              threading.current_thread(),
              ScriptRunContext(
                  session_id="test session id",
                  _enqueue=forward_msg_queue.enqueue,
                  query_string="",
                  session_state=SafeSessionState(
                      SessionState(), lambda: None
                  ),
                  uploaded_file_mgr=None,
                  main_script_path="",
                  page_script_hash="",
                  user_info={"email": "something@else.com"},
              ),
          )
  
          self.assertEqual(
              st.experimental_user.email, "something@else.com"
          )
      except Exception as e:
          raise e
      finally:
          add_script_run_ctx(
              threading.current_thread(), orig_report_ctx
          )
  
file_path: streamlit/lib/tests/streamlit/user_info_test.py
imports: import threading
  import streamlit
  from streamlit.errors import StreamlitAPIException
  from streamlit.runtime.forward_msg_queue import ForwardMsgQueue
  from streamlit.runtime.scriptrunner import ScriptRunContext, add_script_run_ctx, get_script_run_ctx
  from streamlit.runtime.state import SafeSessionState, SessionState
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 10 for calling the UserInfoProxyTest obj's underlying member method code with example usage: obj.test_st_user_reads_from_context_() without return types