Files
StarPilot/tinygrad_repo/conftest.py
T
firestar5683 22a8575199 Vendor dependencies and resources for standalone builds
Keep official openpilot ancestry and dependency licenses. Store resources directly in Git, remove LFS setup requirements, and leave the downloadable big model outside the source tree.
2026-10-03 21:01:18 +00:00

14 lines
542 B
Python

import os, pytest, faulthandler
stderr_fd_key = pytest.StashKey[int]()
def pytest_configure(config):
# dup stderr so that we can still write to it in faulthandler even if stderr would be captured
config.stash[stderr_fd_key] = fd = os.dup(2)
config.add_cleanup(lambda: os.close(fd))
@pytest.hookimpl(wrapper=True)
def pytest_runtest_call(item):
faulthandler.dump_traceback_later(int(os.getenv("TEST_TIMEOUT", 120)), file=item.config.stash[stderr_fd_key], exit=True)
try: yield
finally: faulthandler.cancel_dump_traceback_later()