Spaces:
Sleeping
Sleeping
Commit ·
b101e29
1
Parent(s): ff8b647
Hacer que las pruebas no dejen videos en la carpeta temporal
Browse filesCada corrida de pytest dejaba carpetas camguard-* con videos en
%TEMP%. Un fixture común las manda a la carpeta temporal de pytest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- tests/conftest.py +12 -0
tests/conftest.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import tempfile
|
| 2 |
+
|
| 3 |
+
import pytest
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
@pytest.fixture(autouse=True)
|
| 7 |
+
def _temp_files_inside_pytest(tmp_path, monkeypatch):
|
| 8 |
+
"""Los archivos temporales que crea el código bajo prueba van a la carpeta de pytest.
|
| 9 |
+
|
| 10 |
+
Sin esto, cada corrida dejaba videos de resultado sueltos en la carpeta temporal del sistema.
|
| 11 |
+
"""
|
| 12 |
+
monkeypatch.setattr(tempfile, "tempdir", str(tmp_path))
|