mirror of
https://github.com/facefusion/facefusion.git
synced 2026-11-15 14:46:57 +01:00
21 lines
532 B
Python
21 lines
532 B
Python
import pytest
|
|
|
|
from facefusion.apis.asset_validator import validate_frame_index, validate_subject
|
|
|
|
|
|
def test_validate_subject() -> None:
|
|
assert validate_subject('frame') is True
|
|
assert validate_subject('face') is True
|
|
assert validate_subject('invalid') is False
|
|
|
|
|
|
@pytest.mark.parametrize('frame_index_total, expected',
|
|
[
|
|
(0, False),
|
|
(1, True),
|
|
(100, True),
|
|
(101, False)
|
|
])
|
|
def test_validate_frame_index(frame_index_total : int, expected : bool) -> None:
|
|
assert validate_frame_index([ '0' ] * frame_index_total) is expected
|