class_docstr: Class implements base tests for binary headers
  
  It serves as a base class for other binary header tests
class_docstr_tok: ["Class","implements","base","tests","for","binary","headers","It","serves","as","a","base","class","for","other","binary","header","tests"]
docstr: Its use in initialization tested in the init tests.
  Endianness gives endian interpretation of binary data. It is
  read only because the only common use case is to set the
  endianness on initialization (or occasionally byteswapping the
  data) - but this is done via via the as_byteswapped method
docstr_tok: ["Its","use","in","initialization","tested","in","the","init","tests",".","Endianness","gives","endian","interpretation","of","binary","data",".","It","is","read","only","because","the","only","common","use","case","is","to","set","the","endianness","on","initialization","(","or","occasionally","byteswapping","the","data",")","-","but","this","is","done","via","via","the","as_byteswapped","method"]
code: def test_endianness_ro(self):
      # endianness is a read only property
      """Its use in initialization tested in the init tests.
      Endianness gives endian interpretation of binary data. It is
      read only because the only common use case is to set the
      endianness on initialization (or occasionally byteswapping the
      data) - but this is done via via the as_byteswapped method
      """
      hdr = self.header_class()
      with pytest.raises(AttributeError):
          hdr.endianness = "<"
  
imports: import logging
  from io import BytesIO, StringIO
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ..None import imageglobals
  from ..batteryrunners import Report
  from ..casting import sctypes
  from ..spatialimages import HeaderDataError
  from ..volumeutils import Recoder, native_code, swapped_code
  from ..wrapstruct import LabeledWrapStruct, WrapStruct, WrapStructError
label_desc: Use image node_id 7 for calling the _TestWrapStructBase obj's underlying member method code with example usage: obj.test_endianness_ro() without return types