浏览代码

test: add FEFunctionalTest base class for FE tests

Only has a single property at present: SAMPLE_DIR for the path to where
sample videos are stored

TestVideoActivityFEFunctional now inherits from this instead of unittest.TestCase
main
Rob Hallam 2 个月前
父节点
当前提交
428032d841
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. +8
    -2
      test/test_feature_extractors_functional.py

+ 8
- 2
test/test_feature_extractors_functional.py 查看文件

@@ -15,7 +15,13 @@ These tests are marked slow to avoid running them during normal test runs.
import unittest
import pipeline.feature_extractors as extractors
import test.mocks as mocks
class TestVideoActivityFEFunctional(unittest.TestCase):

class FEFunctionalTest(unittest.TestCase):
"""FEFunctionalTest -- base class for functional tests for feature extractors
"""
SAMPLE_DIR = "/home/robert/code/softdev2023-24/summerproject/highlights/test/sample_videos"

class TestVideoActivityFEFunctional(FEFunctionalTest):
"""TestVisualActivityFEFunctional -- functional tests for visual activity feature extractor
"""

@@ -25,7 +31,7 @@ class TestVideoActivityFEFunctional(unittest.TestCase):
use:
- sample_videos/sample-manual-visualactivity.mp4 :: activity at 15-20s -- pass if activity detected anywhere in this range
"""
SAMPLE_VIDEO = "/home/robert/code/softdev2023-24/summerproject/highlights/test/sample_videos/sample-manual-visualactivity.mp4"
SAMPLE_VIDEO = f"{self.SAMPLE_DIR}/sample-manual-visualactivity.mp4"

START_TIME = 15
END_TIME = 20


正在加载...
取消
保存