-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
137 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import os | ||
import shutil | ||
import tempfile | ||
|
||
from facefusion.filesystem import is_file | ||
|
||
|
||
def get_test_jobs_directory() -> str: | ||
return os.path.join(tempfile.gettempdir(), 'test-jobs') | ||
|
||
|
||
def get_test_examples_directory() -> str: | ||
return os.path.join(tempfile.gettempdir(), 'test-examples') | ||
|
||
|
||
def get_test_outputs_directory() -> str: | ||
return os.path.join(tempfile.gettempdir(), 'test-outputs') | ||
|
||
|
||
def prepare_test_output_directory() -> None: | ||
shutil.rmtree(get_test_outputs_directory()) | ||
os.mkdir(get_test_outputs_directory()) | ||
|
||
|
||
def get_test_example_file(file : str) -> str: | ||
return os.path.join(tempfile.gettempdir(), 'test-examples', file) | ||
|
||
|
||
def get_test_output_file(file : str) -> str: | ||
return os.path.join(tempfile.gettempdir(), 'test-outputs', file) | ||
|
||
|
||
def is_test_output_file(file : str) -> bool: | ||
return is_file(get_test_output_file(file)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters