class_docstr: Test component declaration.
class_docstr_tok: ["Test","component","declaration","."]
docstr: Test component name generation
docstr_tok: ["Test","component","name","generation"]
code: def test_name(self):
      """Test component name generation"""
      # Test a component defined in a module with no package
      component = components.declare_component("foo", url=URL)
      self.assertEqual(
          "tests.streamlit.components_test.foo", component.name
      )
  
      # Test a component defined in __init__.py
      from tests.streamlit.component_test_data import (
          component as init_component,
      )
  
      self.assertEqual(
          "tests.streamlit.component_test_data.foo",
          init_component.name,
      )
  
      # Test a component defined in a module within a package
      from tests.streamlit.component_test_data.outer_module import (
          component as outer_module_component,
      )
  
      self.assertEqual(
          "tests.streamlit.component_test_data.outer_module.foo",
          outer_module_component.name,
      )
  
      # Test a component defined in module within a nested package
      from tests.streamlit.component_test_data.nested.inner_module import (
          component as inner_module_component,
      )
  
      self.assertEqual(
          "tests.streamlit.component_test_data.nested.inner_module.foo",
          inner_module_component.name,
      )
  
imports: import json
  import os
  import unittest
  from typing import Any
  from unittest import mock
  from unittest.mock import MagicMock, patch
  import pandas
  import pytest
  import streamlit
  import streamlit.components.v1
  from streamlit.components.v1 import component_arrow
  from streamlit.components.v1.components import ComponentRegistry, CustomComponent
  from streamlit.errors import DuplicateWidgetID, StreamlitAPIException
  from streamlit.proto.Components_pb2 import SpecialArg
  from streamlit.type_util import to_bytes
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 2 for calling the DeclareComponentTest obj's underlying member method code with example usage: obj.test_name() without return types