class_docstr: Tests initialization and instance methods of the ``Dataset`` class.
docstr: Test that ``write`` will always copy attributes that are identifiers.
docstr_tok: ["Test","that","``","write","``","will","always","copy","attributes","that","are","identifiers","."]
code: def test_write_partial_always_copies_identifiers(
      self, attributes_arg, attributes_expect
  ):
      """Test that ``write`` will always copy attributes that are identifiers."""
      ds = Dataset(
          x="a", y="b", data="Some data", identifiers=("x", "y")
      )
      ds_2 = Dataset()
  
      ds.write(ds_2, attributes=attributes_arg)
      assert set(ds_2.list_attributes()) == set(attributes_expect)
      assert ds_2.identifiers == ds.identifiers
  
imports: from numbers import Number
  from pathlib import Path
  from typing import ClassVar, Dict
  import numpy
  import pytest
  from pennylane.data import AttributeInfo, Dataset, DatasetJSON, DatasetNotWriteableError, DatasetScalar, attribute, field
  from pennylane.data.base.dataset import UNSET, _init_arg
  from pennylane.data.base.hdf5 import open_group
label_desc: Use image node_id 29 for calling the TestDataset obj's underlying member method code with example usage: obj.test_write_partial_always_copies_identifiers(attributes_arg, attributes_expect) without return types