Browse Source

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 months ago
parent
commit
428032d841
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      test/test_feature_extractors_functional.py

+ 8
- 2
test/test_feature_extractors_functional.py View File

@@ -15,7 +15,13 @@ These tests are marked slow to avoid running them during normal test runs.
import unittest import unittest
import pipeline.feature_extractors as extractors import pipeline.feature_extractors as extractors
import test.mocks as mocks 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 """TestVisualActivityFEFunctional -- functional tests for visual activity feature extractor
""" """


@@ -25,7 +31,7 @@ class TestVideoActivityFEFunctional(unittest.TestCase):
use: use:
- sample_videos/sample-manual-visualactivity.mp4 :: activity at 15-20s -- pass if activity detected anywhere in this range - 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 START_TIME = 15
END_TIME = 20 END_TIME = 20


Loading…
Cancel
Save