old_contents: import unittest
  import ndio.remote.OCP as OCP
  import ndio.ramon
  import ndio.convert.png as ndpng
  import ndio.convert.tiff as ndtiff
  import numpy
  
  class TestDownload(unittest.TestCase):
  
      def setUp(self):
          self.oo = OCP()
  
  
      def test_export_import_png(self):
          # kasthuri11/image/xy/3/1000,1100/1000,1100/1000/
          image_download = self.oo.get_image('kasthuri11', 'image',
                                              1000, 1100,
                                              1000, 1100,
                                              1000,
                                              resolution=3)
  
          # if returns string, successful export
          self.assertEqual(
                  ndpng.export_png("download.png", image_download),
                  "download.png")
  
          # now confirm import works too
          self.assertEqual(ndpng.import_png("download.png")[0][0], image_download[0][0])
          self.assertEqual(ndpng.import_png("download.png")[10][10], image_download[10][10])
  
  
      def test_export_import_tiff(self):
          # kasthuri11/image/xy/3/1000,1100/1000,1100/1000/
          image_download = self.oo.get_image('kasthuri11', 'image',
                                              1000, 1100,
                                              1000, 1100,
                                              1000,
                                              resolution=3)
  
          # if returns string, successful export
          self.assertEqual(
                  ndtiff.export_tiff("download.tiff", image_download),
                  "download.tiff")
  
          # now confirm import works too
          self.assertEqual(ndtiff.import_tiff("download.tiff")[0][0], image_download[0][0])
          self.assertEqual(ndtiff.import_tiff("download.tiff")[10][10], image_download[10][10])
  
  
  if __name__ == '__main__':
      unittest.main()
  
new_contents: import unittest
  import ndio.remote.OCP as OCP
  import ndio.ramon
  import ndio.convert.png as ndpng
  import ndio.convert.tiff as ndtiff
  import numpy
  
  class TestDownload(unittest.TestCase):
  
      def setUp(self):
          self.oo = OCP()
  
  
      def test_export_import_png(self):
          # kasthuri11/image/xy/3/1000,1100/1000,1100/1000/
          image_download = self.oo.get_image('kasthuri11', 'image',
                                              1000, 1100,
                                              1000, 1100,
                                              1000,
                                              resolution=3)
  
          # if returns string, successful export
          self.assertEqual(
                  ndpng.export_png("download.png", image_download),
                  "download.png")
  
          # now confirm import works too
          self.assertEqual(ndpng.import_png("download.png")[0][0], image_download[0][0])
          self.assertEqual(ndpng.import_png("download.png")[10][10], image_download[10][10])
  
  
      def test_export_import_tiff(self):
          # kasthuri11/image/xy/3/1000,1100/1000,1100/1000/
          image_download = self.oo.get_image('kasthuri11', 'image',
                                              1000, 1100,
                                              1000, 1100,
                                              1000,
                                              resolution=3)
  
          # if returns string, successful export
          self.assertEqual(
                  ndtiff.export_tiff("download-1.tiff", image_download),
                  "download-1.tiff")
  
          # now confirm import works too
          self.assertEqual(ndtiff.import_tiff("download-1.tiff")[0][0], image_download[0][0])
          self.assertEqual(ndtiff.import_tiff("download-1.tiff")[10][10], image_download[10][10])
  
  
  if __name__ == '__main__':
      unittest.main()
  
subject: resolve text-export