class_docstr: Apply general image tests to MGHImage
class_docstr_tok: ["Apply","general","image","tests","to","MGHImage"]
code: def check_dtypes(self, expected, actual):
      # Some images will want dtypes to be equal including endianness,
      # others may only require the same type
      # MGH requires the actual to be a big endian version of expected
      assert expected.newbyteorder(">") == actual
  
imports: import io
  import os
  import pathlib
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from ...None import imageglobals
  from ...fileholders import FileHolder
  from ...openers import ImageOpener
  from ...spatialimages import HeaderDataError
  from ...testing import data_path
  from ...tests import test_spatialimages
  from ...tests import test_wrapstruct
  from ...tmpdirs import InTemporaryDirectory
  from ...volumeutils import sys_is_le
  from ...wrapstruct import WrapStructError
  from ..None import load, save
  from ..mghformat import MGHError, MGHHeader, MGHImage
label_desc: Use image node_id 1 for calling the TestMGHImage obj's underlying member method code with example usage: obj.check_dtypes(expected, actual) without return types