class_docstr: The ninjo tiff writer tests.
class_docstr_tok: ["The","ninjo","tiff","writer","tests","."]
docstr: Test saving a dataset.
docstr_tok: ["Test","saving","a","dataset","."]
code: def test_dataset(self, iwsd):
      """Test saving a dataset."""
      from satpy.writers.ninjotiff import NinjoTIFFWriter
  
      ntw = NinjoTIFFWriter()
      dataset = xr.DataArray([1, 2, 3], attrs={"units": "K"})
      with mock.patch("satpy.writers.ninjotiff.convert_units") as uconv:
          ntw.save_dataset(dataset, physic_unit="CELSIUS")
          uconv.assert_called_once_with(dataset, "K", "CELSIUS")
      assert iwsd.call_count == 1
  
file_path: satpy/satpy/tests/writer_tests/test_ninjotiff.py
imports: import sys
  import unittest
  from unittest import mock
  import numpy
  import pytest
  import xarray
label_desc: Use image node_id 2 for calling the TestNinjoTIFFWriter obj's underlying member method code with example usage: obj.test_dataset(iwsd) without return types