| 71 | |
| 72 | @dataclass |
| 73 | class TestCase: |
| 74 | __test__ = False |
| 75 | """Properties for detector test cases.""" |
| 76 | path: str |
| 77 | """Path to video for test case.""" |
| 78 | detector: SceneDetector |
| 79 | """Detector instance to use.""" |
| 80 | start_time: int |
| 81 | """Start time as frames.""" |
| 82 | end_time: int |
| 83 | """End time as frames.""" |
| 84 | scene_boundaries: list[int] |
| 85 | """Scene boundaries.""" |
| 86 | |
| 87 | def detect(self): |
| 88 | """Run scene detection for test case. Should only be called once.""" |
| 89 | return detect( |
| 90 | video_path=self.path, |
| 91 | detector=self.detector, |
| 92 | start_time=self.start_time, |
| 93 | end_time=self.end_time, |
| 94 | ) |
| 95 | |
| 96 | |
| 97 | def get_fast_cut_test_cases(): |
no outgoing calls