class_docstr: Tests for :class:`pennylane.data.mapper.AttributeTypeMapper`.
class_docstr_tok: ["Tests","for",":","class",":","`","pennylane.data.mapper.AttributeTypeMapper","`","."]
docstr: Test that __str__ is equivalent to dict.__str__.
docstr_tok: ["Test","that","__str__","is","equivalent","to","dict.__str__","."]
code: def test_str(self):
      """Test that __str__ is equivalent to dict.__str__."""
      mapper = AttributeTypeMapper(create_group())
  
      mapper["x"] = 1
      mapper["y"] = {"a": "b"}
  
      assert str(mapper) == str(
          {"x": DatasetScalar(1), "y": {"a": "b"}}
      )
  
file_path: pennylane/tests/data/base/test_mapper.py
imports: from unittest.mock import MagicMock
  import pytest
  import pennylane.data.base.mapper
  from pennylane.data import AttributeInfo, Dataset, DatasetScalar
  from pennylane.data.base.hdf5 import create_group
  from pennylane.data.base.mapper import AttributeTypeMapper
label_desc: Use image node_id 5 for calling the TestMapper obj's underlying member method code with example usage: obj.test_str() without return types