code: def test_single_export(exported_files, tmpdir):
      canvas = TestingCanvas()
      block_vars = _create_fake_block_vars(canvas)
      gallery_conf = _create_fake_gallery_conf(str(tmpdir))
      with tmpdir.as_cwd():
          # create the files that the example should have created
          for fn in exported_files:
              open(fn, "w").close()
  
          with open("example.py", "w") as example_file:
              example_file.write(
                  """# vispy: gallery-exports {}
              """.format(
                      " ".join(exported_files)
                  )
              )
  
          scraper = VisPyGalleryScraper()
          rst = scraper(None, block_vars, gallery_conf)
          for idx, fn in enumerate(exported_files):
              # the original file should have been moved
              assert not os.path.isfile(fn)
              # the new name should from the sphinx-gallery iterator
              new_name = str(idx) + os.path.splitext(fn)[1]
              assert os.path.isfile(new_name)
              assert new_name in rst
  
file_path: vispy/vispy/util/tests/test_gallery_scraper.py
imports: import os
  from vispy.testing import TestingCanvas, requires_application
  import pytest
  from ..gallery_scraper import VisPyGalleryScraper
label_desc: Use image node_id 5 for calling a global function with example usage: test_single_export(exported_files, tmpdir) without return types