class_docstr: Test zipapp module functionality.
class_docstr_tok: ["Test","zipapp","module","functionality","."]
code: def test_custom_interpreter(self):
      # Test that a shebang line with a custom interpreter is written
      # correctly.
      source = self.tmpdir / "source"
      source.mkdir()
      (source / "__main__.py").touch()
      target = self.tmpdir / "source.pyz"
      zipapp.create_archive(
          str(source), str(target), interpreter="python"
      )
      with target.open("rb") as f:
          self.assertEqual(f.read(2), b"#!")
          self.assertEqual(b"python\n", f.readline())
  
imports: import io
  import pathlib
  import stat
  import sys
  import tempfile
  import unittest
  import zipapp
  import zipfile
  from test.support import requires_zlib
  from test.support import os_helper
  from unittest.mock import patch
label_desc: Use image node_id 16 for calling the ZipAppTest obj's underlying member method code with example usage: obj.test_custom_interpreter() without return types