docstr: Test st.spinner.
docstr_tok: ["Test","st.spinner","."]
code: def test_spinner(self):
      """Test st.spinner."""
      with spinner("some text"):
          # Without the timeout, the spinner is sometimes not available
          time.sleep(0.7)
          el = self.get_delta_from_queue().new_element
          self.assertEqual(el.spinner.text, "some text")
          self.assertFalse(el.spinner.cache)
      # Check if it gets reset to st.empty()
      last_delta = self.get_delta_from_queue()
      self.assertTrue(last_delta.HasField("new_element"))
      self.assertEqual(
          last_delta.new_element.WhichOneof("type"), "empty"
      )
  
file_path: streamlit/lib/tests/streamlit/spinner_test.py
imports: import time
  from streamlit.elements.spinner import spinner
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 1 for calling the SpinnerTest obj's underlying member method code with example usage: obj.test_spinner() without return types