Skip to content

Commit

Permalink
[tests] Fix incorrect type hints in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Breakthrough committed Apr 18, 2024
1 parent cab0bb7 commit cd13adc
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/test_detectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,14 @@
from scenedetect.detectors import *
from scenedetect.backends.opencv import VideoStreamCv2


FAST_CUT_DETECTORS: tuple[type[SceneDetector]] = (
FAST_CUT_DETECTORS: ty.Tuple[ty.Type[SceneDetector]] = (
AdaptiveDetector,
ContentDetector,
HashDetector,
HistogramDetector,
)

ALL_DETECTORS: tuple[type[SceneDetector]] = (
*FAST_CUT_DETECTORS,
ThresholdDetector
)
ALL_DETECTORS: ty.Tuple[ty.Type[SceneDetector]] = (*FAST_CUT_DETECTORS, ThresholdDetector)

# TODO(#53): Add a test that verifies algorithms output relatively consistent frame scores
# regardless of resolution. This will ensure that threshold values will hold true for different
Expand Down Expand Up @@ -93,7 +89,8 @@ def get_fast_cut_test_cases():
"""Fixture for parameterized test cases that detect fast cuts."""
test_cases = []
# goldeneye.mp4 with min_scene_len = 15 (default)
test_cases += [pytest.param(
test_cases += [
pytest.param(
TestCase(
path=get_absolute_path("resources/goldeneye.mp4"),
detector=detector_type(min_scene_len=15),
Expand All @@ -103,7 +100,8 @@ def get_fast_cut_test_cases():
id="%s/default" % detector_type.__name__) for detector_type in FAST_CUT_DETECTORS
]
# goldeneye.mp4 with min_scene_len = 30
test_cases += [pytest.param(
test_cases += [
pytest.param(
TestCase(
path=get_absolute_path("resources/goldeneye.mp4"),
detector=detector_type(min_scene_len=30),
Expand All @@ -114,6 +112,7 @@ def get_fast_cut_test_cases():
]
return test_cases


def get_fade_in_out_test_cases():
"""Fixture for parameterized test cases that detect fades."""
# TODO: min_scene_len doesn't seem to be working as intended for ThresholdDetector.
Expand Down

0 comments on commit cd13adc

Please sign in to comment.