class_docstr: Tests initialization and instance methods of the ``Dataset`` class.
docstr: Test that a base dataset's data_name can be set on init, and that
  it defaults to the class data name if none is provided.
docstr_tok: ["Test","that","a","base","dataset","'s","data_name","can","be","set","on","init",",","and","that","it","defaults","to","the","class","data","name","if","none","is","provided","."]
code: def test_init_dataname(self, data_name, expect):
      """Test that a base dataset's data_name can be set on init, and that
      it defaults to the class data name if none is provided."""
      ds = Dataset(data_name=data_name)
  
      assert ds.data_name == expect
  
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 2 for calling the TestDataset obj's underlying member method code with example usage: obj.test_init_dataname(data_name, expect) without return types