code: def test_lint(lint, case):
      lint = LINT_DIR.joinpath(lint)
  
      try:
          out = (
              sp.check_output(
                  [
                      "python",
                      "-m",
                      "snakemake",
                      "--lint",
                      "--directory",
                      str(lint),
                      "--snakefile",
                      str(lint.joinpath(case).with_suffix(".smk")),
                  ],
                  stderr=sp.STDOUT,
              )
              .decode()
              .strip()
          )
          if case == "positive":
              assert (
                  out
                  == "Congratulations, your workflow is in a good condition!"
              )
          else:
              print(out, file=sys.stderr)
              assert (
                  False
              ), "Negative lint example but linting command exited with status 0."
  
      except sp.CalledProcessError as e:
          if case == "negative":
              assert e.output.decode().strip()
          else:
              print(e.output.decode().strip(), file=sys.stderr)
              raise e
  
      else:
          print(out, file=sys.stderr)
          assert out
  
imports: import os, sys
  from pathlib import Path
  import subprocess
  from itertools import product
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_lint(lint, case) without return types