Parcourir la 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 il y a 2 mois
Parent
révision
428032d841
1 fichiers modifiés avec 8 ajouts et 2 suppressions
  1. +8
    -2
      test/test_feature_extractors_functional.py

+ 8
- 2
test/test_feature_extractors_functional.py Voir le fichier

@@ -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


Chargement…
Annuler
Enregistrer