mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-07-09 21:18:36 +02:00
fix(tests):
This commit is contained in:
@@ -22,7 +22,7 @@ class ProbeDataset:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@cache_to_disk()
|
# @cache_to_disk(n_days_to_cache=1)
|
||||||
def load_dataset_generic(name, getter=lambda x: x["train"]["prompt"]):
|
def load_dataset_generic(name, getter=lambda x: x["train"]["prompt"]):
|
||||||
from datasets import load_dataset
|
from datasets import load_dataset
|
||||||
|
|
||||||
|
|||||||
Generated
+35
-199
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,16 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from cache_to_disk import delete_old_disk_caches
|
||||||
|
from agentic_security.logutils import logger
|
||||||
|
|
||||||
|
|
||||||
def pytest_runtest_setup(item):
|
def pytest_runtest_setup(item):
|
||||||
if "slow" in item.keywords and not os.getenv("RUN_SLOW_TESTS"):
|
if "slow" in item.keywords and not os.getenv("RUN_SLOW_TESTS"):
|
||||||
pytest.skip("Skipping slow test")
|
pytest.skip("Skipping slow test")
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, scope="session")
|
||||||
|
def setup_delete_old_disk_caches():
|
||||||
|
logger.info("delete_old_disk_caches")
|
||||||
|
delete_old_disk_caches()
|
||||||
|
|||||||
Reference in New Issue
Block a user