docstr: Align an image from the fly screen against itself.
  
  This is a regression test for the bug, IMG-284
docstr_tok: ["Align","an","image","from","the","fly","screen","against","itself",".","This","is","a","regression","test","for","the","bug",",","IMG-284"]
code: def test_05_01_align_self(self):
      """Align an image from the fly screen against itself.
  
      This is a regression test for the bug, IMG-284
      """
      image = read_example_image("ExampleFlyImages", "01_POS002_D.TIF")
      image = image[0:300, 0:300]  # make smaller so as to be faster
      workspace, module = self.make_workspace(
          (image, image), (None, None)
      )
      module.alignment_method.value = M_MUTUAL_INFORMATION
      module.crop_mode.value = C_PAD
      module.run(workspace)
      m = workspace.measurements
      assert (
          m.get_current_image_measurement("Align_Xshift_Aligned1") == 0
      )
      assert (
          m.get_current_image_measurement("Align_Yshift_Aligned1") == 0
      )
  
imports: from io import StringIO
  import numpy
  from cellprofiler_core.constants.measurement import COLTYPE_INTEGER
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.modules.align import Align, A_SIMILARLY, A_SEPARATELY, M_MUTUAL_INFORMATION, C_SAME_SIZE, C_CROP, C_PAD, M_CROSS_CORRELATION, MEASUREMENT_FORMAT, C_ALIGN
  from cellprofiler_core.object import ObjectSet
  from cellprofiler_core.pipeline import Pipeline, LoadException
  from cellprofiler_core.preferences import set_headless
  from cellprofiler_core.workspace import Workspace
  from tests.core.modules import read_example_image
  from cellprofiler_core.image import ImageSetList, Image
label_desc: Use image node_id 18 for calling the TestAlign obj's underlying member method code with example usage: obj.test_05_01_align_self() without return types