code: def test_incremental(self, mypy_runner, per_func_cachedir, pathname):
      import patch
  
      cachedir = per_func_cachedir
  
      dest = os.path.join(cachedir, "mymodel")
      os.mkdir(dest)
  
      patches = set()
  
      print("incremental test: %s" % pathname)
  
      for fname in os.listdir(pathname):
          if fname.endswith(".py"):
              shutil.copy(
                  os.path.join(pathname, fname),
                  os.path.join(dest, fname),
              )
              print("copying to: %s" % os.path.join(dest, fname))
          elif fname.endswith(".testpatch"):
              patches.add(fname)
  
      for patchfile in [None] + sorted(patches):
          if patchfile is not None:
              print("Applying patchfile %s" % patchfile)
              patch_obj = patch.fromfile(
                  os.path.join(pathname, patchfile)
              )
              assert patch_obj.apply(1, dest), (
                  "pathfile %s failed" % patchfile
              )
          print("running mypy against %s" % dest)
          result = mypy_runner(
              dest,
              use_plugin=True,
              use_cachedir=cachedir,
          )
          eq_(
              result[2],
              0,
              msg="Failure after applying patch %s: %s"
              % (patchfile, result[0]),
          )
  
file_path: sqlalchemy/test/ext/mypy/test_mypy_plugin_py3k.py
imports: import os
  import shutil
  from sqlalchemy import testing
  from sqlalchemy.testing import eq_
  from sqlalchemy.testing import fixtures
label_desc: Use image node_id 1 for calling the MypyPluginTest obj's underlying member method code with example usage: obj.test_incremental(mypy_runner, per_func_cachedir, pathname) without return types