From 176e06c4bdd5ef77329f24337a7d38996a3497eb Mon Sep 17 00:00:00 2001 From: EJClaw Date: Thu, 5 Nov 2026 15:00:45 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=EC=97=94=EC=A7=84=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=EA=B0=80=20Windows=20=EC=97=90=EC=84=9C=20cuBLAS=20?= =?UTF-8?q?=EB=A5=BC=20=EC=8B=A4=EC=A0=9C=EB=A1=9C=20=EB=B0=9B=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EA=B2=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기본 device=cuda 라 Windows 에서 엔진을 띄우면 시작 때 541MB 를 받느라 레벨 게이지 테스트(3초 제한)가 실패했다. Co-Authored-By: Claude Opus 5.5 --- tests/conftest.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..67f2d76 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,21 @@ +"""모든 테스트 공통 설정.""" + +from __future__ import annotations + +from types import SimpleNamespace + +import pytest + + +@pytest.fixture(autouse=True) +def _no_cublas_download(monkeypatch): + """엔진 테스트가 Windows 에서 cuBLAS(541MB)를 실제로 받지 않게 한다. + + 기본 설정이 device=cuda 라 엔진을 띄우면 Windows 에서는 시작 때 cuBLAS 를 + 준비한다. 그러면 시작이 느려져 시간 제한이 있는 테스트가 실패한다. 엔진이 + 붙잡은 모듈 참조만 바꾸므로 `test_cuda_runtime` 은 진짜 모듈을 그대로 본다. + """ + monkeypatch.setattr( + "livesub.core.engine.cuda_runtime", + SimpleNamespace(ensure=lambda *args, **kwargs: False), + )