class_docstr: Tests for st.secrets with a single secrets.toml file
class_docstr_tok: ["Tests","for","st.secrets","with","a","single","secrets.toml","file"]
docstr: Secrets access raises an error, and calls st.error, if
  secrets.toml is malformed.
docstr_tok: ["Secrets","access","raises","an","error",",","and","calls","st.error",",","if","secrets.toml","is","malformed","."]
code: def test_malformed_toml_error(self, mock_st_error, _):
      """Secrets access raises an error, and calls st.error, if
      secrets.toml is malformed.
      """
      with self.assertRaises(TomlDecodeError):
          self.secrets.get("no_such_secret", None)
  
      mock_st_error.assert_called_once_with(
          f"Error parsing secrets file at /mock/secrets.toml"
      )
  
imports: import os
  import tempfile
  import unittest
  from collections.abc import Mapping
  from collections.abc import MutableMapping
  from typing import Mapping, MutableMapping
  from unittest.mock import MagicMock, mock_open, patch
  from parameterized import parameterized
  from toml import TomlDecodeError
  from streamlit.runtime.secrets import SECRETS_FILE_LOCS, AttrDict, Secrets
  from tests.exception_capturing_thread import call_on_threads
label_desc: Use image node_id 11 for calling the SecretsTest obj's underlying member method code with example usage: obj.test_malformed_toml_error(mock_st_error, _) without return types