code: def test_save_file(self):
      filename = temp_filename(self.tempdir, ".jpg")
  
      im = pyvips.Image.black(10, 20)
      im.write_to_file(filename)
      assert os.path.isfile(filename)
  
      os.remove(filename)
  
file_path: pyvips/tests/test_saveload.py
imports: import os
  import tempfile
  import pytest
  import pyvips
  from helpers import temp_filename, skip_if_no, _is_PY3, IMAGES, JPEG_FILE
label_desc: Use image node_id 2 for calling the TestSaveLoad obj's underlying member method code with example usage: obj.test_save_file() without return types