mirror of
https://github.com/facefusion/facefusion.git
synced 2026-09-19 05:52:16 +02:00
prevent job path leak
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
@@ -7,13 +6,13 @@ import pytest
|
||||
from facefusion import ffmpeg, ffmpeg_builder, process_manager, state_manager
|
||||
from facefusion.download import conditional_download
|
||||
from facefusion.jobs.job_manager import clear_jobs, count_step_total, init_jobs
|
||||
from facefusion.session_context import resolve_local_id
|
||||
from .assert_helper import get_test_example_file, get_test_examples_directory, get_test_jobs_directory, get_test_output_path, is_test_job_file
|
||||
|
||||
|
||||
@pytest.fixture(scope = 'module', autouse = True)
|
||||
def before_all() -> None:
|
||||
state_manager.init()
|
||||
state_manager.init_item('jobs_path', get_test_jobs_directory())
|
||||
|
||||
process_manager.start()
|
||||
conditional_download(get_test_examples_directory(),
|
||||
@@ -36,11 +35,8 @@ def before_all() -> None:
|
||||
|
||||
@pytest.fixture(scope = 'function', autouse = True)
|
||||
def before_each() -> None:
|
||||
local_id = resolve_local_id()
|
||||
jobs_path = os.path.join(get_test_jobs_directory(), local_id)
|
||||
|
||||
clear_jobs(get_test_jobs_directory())
|
||||
init_jobs(jobs_path)
|
||||
init_jobs(state_manager.get_jobs_path())
|
||||
|
||||
|
||||
def test_job_list() -> None:
|
||||
|
||||
Reference in New Issue
Block a user