class_docstr: Test temp directory context manager.
docstr: Test that the directory only exists inside the context.
docstr_tok: ["Test","that","the","directory","only","exists","inside","the","context","."]
code: def test_temp_directory(self, dir):
      """Test that the directory only exists inside the context."""
      with TemporaryDirectory(dir=dir.path) as temp_fname:
          self.assertTrue(os.path.exists(temp_fname))
      self.assertFalse(os.path.exists(temp_fname))
  
imports: import os
  import unittest
  from testfixtures import tempdir
  from streamlit.temporary_directory import TemporaryDirectory
label_desc: Use image node_id 1 for calling the TemporaryFileTest obj's underlying member method code with example usage: obj.test_temp_directory(dir) without return types