class_docstr: Tests for :class:`pennylane.data.mapper.AttributeTypeMapper`.
class_docstr_tok: ["Tests","for",":","class",":","`","pennylane.data.mapper.AttributeTypeMapper","`","."]
docstr: Test that set_item() copies info from the
  info argument when passed a DatasetAttribute.
docstr_tok: ["Test","that","set_item","(",")","copies","info","from","the","info","argument","when","passed","a","DatasetAttribute","."]
code: def test_set_item_attribute_with_info(self):
      """Test that set_item() copies info from the
      info argument when passed a DatasetAttribute."""
      dset = Dataset()
      mapper = AttributeTypeMapper(dset.bind)
  
      mapper.set_item(
          "x",
          DatasetScalar(1, info=AttributeInfo(doc="abc")),
          info=AttributeInfo(extra="xyz"),
      )
  
      assert dset.attr_info["x"].doc == "abc"
      assert dset.attr_info["x"]["extra"] == "xyz"
  
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 2 for calling the TestMapper obj's underlying member method code with example usage: obj.test_set_item_attribute_with_info() without return types