class_docstr: Test saving a MultiScene to various formats.
class_docstr_tok: ["Test","saving","a","MultiScene","to","various","formats","."]
docstr: Save a series of fake scenes to an PNG images.
docstr_tok: ["Save","a","series","of","fake","scenes","to","an","PNG","images","."]
code: def test_save_datasets_simple(self):
      """Save a series of fake scenes to an PNG images."""
      from satpy import MultiScene
  
      area = _create_test_area()
      scenes = _create_test_scenes(area=area)
  
      # Add a dataset to only one of the Scenes
      scenes[1]["ds3"] = _create_test_dataset("ds3")
      # Add a start and end time
      for ds_id in ["ds1", "ds2", "ds3"]:
          scenes[1][ds_id].attrs["start_time"] = datetime(2018, 1, 2)
          scenes[1][ds_id].attrs["end_time"] = datetime(2018, 1, 2, 12)
          if ds_id == "ds3":
              continue
          scenes[0][ds_id].attrs["start_time"] = datetime(2018, 1, 1)
          scenes[0][ds_id].attrs["end_time"] = datetime(2018, 1, 1, 12)
  
      mscn = MultiScene(scenes)
      client_mock = mock.MagicMock()
      client_mock.compute.side_effect = lambda x: tuple(v for v in x)
      client_mock.gather.side_effect = lambda x: x
      with mock.patch(
          "satpy.multiscene._multiscene.Scene.save_datasets"
      ) as save_datasets:
          save_datasets.return_value = [
              True
          ]  # some arbitrary return value
          # force order of datasets by specifying them
          mscn.save_datasets(
              base_dir=self.base_dir,
              client=False,
              datasets=["ds1", "ds2", "ds3"],
              writer="simple_image",
          )
  
      # 2 for each scene
      assert save_datasets.call_count == 2
  
file_path: satpy/satpy/tests/multiscene_tests/test_save_animation.py
imports: import os
  import shutil
  import tempfile
  import unittest
  from datetime import datetime
  from unittest import mock
  import pytest
  from satpy.tests.multiscene_tests.test_utils import _create_test_area, _create_test_dataset, _create_test_scenes, _fake_get_enhanced_image
label_desc: Use image node_id 5 for calling the TestMultiSceneSave obj's underlying member method code with example usage: obj.test_save_datasets_simple() without return types