Skip to content

Commit

Permalink
Use a temp copy of the CVE cache to avoid altering repository files
Browse files Browse the repository at this point in the history
for it/e3-core#32
  • Loading branch information
enzbang committed Dec 11, 2024
1 parent 96fed5b commit 72878aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/tests_e3/cve/cve_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from e3.cve import NVD
from e3.fs import cp

import os

Expand All @@ -8,7 +9,8 @@ def test_nvd_cve_search(socket_disabled):
from requests_cache import NEVER_EXPIRE
from warnings import catch_warnings, simplefilter as warn_filter

cache_db = os.path.join(os.path.dirname(__file__), "cache")
cache_db = os.path.join(os.getcwd(), "cache")
cp(os.path.join(os.path.dirname(__file__), "cache"), cache_db, recursive=True)

with catch_warnings(record=True) as w:
# Used to always trigger python warnings if they appear
Expand Down

0 comments on commit 72878aa

Please sign in to comment.