"""tools/image/gate/test_dit_step_check.py - TEST-ONLY: dit_step_check.py on a fake folder (no model, no GPU). python -m pytest tools/image/gate/test_dit_step_check.py""" import contextlib import io import sys import tempfile import unittest from pathlib import Path import numpy as np sys.path.insert(0, str(Path(__file__).resolve().parent)) import dit_step_check as K # noqa: E402 def put(path: Path, a: np.ndarray, npy: bool = False) -> None: path.parent.mkdir(parents=True, exist_ok=True) if npy: np.save(path, a) else: a.astype("