Rob Hallam
c18433dd01
feat&test: [WFE] defaults, pull out calls for mocking, unit tests
Calls pulled out relate to setup and working of Whisper:
- _whispermodel()
- _batched_inference_pipeline()
- _transcribe()
Defaults defined: model, device, compute type, beamsize, batchsize, pipeline type
Tests:
- basic init
- init with no media
- run() with no words (early exit 0 Features)
- run() with mocked transcribe
NOTE: these are unit tests and do not exercise Whisper
2 months ago
Rob Hallam
1c9a6a6329
test: [fefunctional] add pytest and mark LaughFE slow&verslow
Also add note that it takes 8-10s to run a single LaughFE test
2 months ago
Rob Hallam
9af169f637
test: add TestLaughterFEFunctional
Uses a manually-crafted video with laughters between 15-20s.
Test takes LaughFE's internal Feature time adjustment into account (see related
commit).
Note: very slow test
@see : df3c559
2 months ago
Rob Hallam
8a5916192a
test: add negative test to TestLoudAudioFEFunctional
Video file with silent audio (generated with sox) -- should produce no features
since "-inf" are filtered by the FE
2 months ago
Rob Hallam
192c952c2d
test: add TestLoudAudioFEFunctional
Functional tests for LoudAudioFeatureExtractor
Currently uses one manually-generated video with blank audio except between
15-20s where 1-2 sine tones are present
2 months ago
Rob Hallam
428032d841
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
2 months ago
Rob Hallam
2e45486372
test: add TestVideoActivityFEFunctional
Tests VAFE using a manually-created 30 seconds video with activity between
15 and 20 seconds.
Relatively quick!
2 months ago
Rob Hallam
0d2096aed6
refactor!: rename video_producers → producers
Since it no longer simply produces videos this name is preferred
Also update tests to use updated module name
3 months ago
Rob Hallam
445efac7f3
test: [producers] add test_produce() functionality
Uses unittest.mock.path to patch out call to matplotlib.pyplot.savefig()
TODO: better, more-granular tests of the bits of functionality here
3 months ago
Rob Hallam
ff09cd4b8f
test: [mocks] add attrs to MockFeature + MockSource.duration()
3 months ago
Rob Hallam
649fcae070
test: expand TestFfmpegVideoProducer coverage
mocks out calls to ffmpeg for obvious reasons
3 months ago
Rob Hallam
3dc2a5c858
test: add mocks module for commonly-mocked objects
Includes:
- MockInterval
- MockFeature
- MockSource
3 months ago
Rob Hallam
6cb0d723ac
test: [utils] add TestFeature fixtures
Gets utils coverage up to 100% (for now)
3 months ago
Rob Hallam
7ca0720be2
test: add Interval.test_eq method
@see : 0a08af4
3 months ago
Rob Hallam
0a08af4972
test: add MockSource & MockInterval to test Feature
3 months ago
Rob Hallam
1bd176848a
test [utils] add Interval tests
Covers:
- to_json
- move_end
- update_duration
- unhappy path exceptions (mostly init)
3 months ago
Rob Hallam
35d25c6ff2
test: [utils] add TestSource.test_to_json
3 months ago
Rob Hallam
33ccffaead
test: add TestLAFE.t_extract_mocked_get)loudnesses()
Gets test coverage for this module to 100%! (for now)
3 months ago
Rob Hallam
e3b9862bcf
test: add TestFfmpegVideoProducer
3 months ago
Rob Hallam
48ead78c9a
test: add TestJSONP & TestVisualisationP
3 months ago
Rob Hallam
5993289d7d
test: add move_end method for overlap testing
3 months ago
Rob Hallam
fb8f3270e5
test: add mocked loudnorm to TestLAFE
3 months ago
Rob Hallam
028adbc640
test: add TestJSONFE with mocks
3 months ago
Rob Hallam
bee133d53f
test: Add mocked test calls to TestLFE
3 months ago
Rob Hallam
4eaddf9db2
test: add TestVAFE
3 months ago
Rob Hallam
d38d5e619f
test: add LAFE - no input files & test_extract()
3 months ago
Rob Hallam
9bdd90c4c0
test: add TestLAFE
TestLoudAudioFeatureExtractor -- init only
3 months ago
Rob Hallam
28e33ed47a
test: add TestSourceMedia & RFE.test_no_input
TestSourceMedia is a mockinobject so
TODO: rename
3 months ago
Rob Hallam
cd8d57e9b1
test: add tests for LAFE and RFE
Initialset of tests for LaughterFeatureExtractor and
RandomFeatureExtractor
3 months ago
Rob Hallam
fcfc1773bc
feat: add suite of tests for utils module
This covers:
- Source
- SourceMedia
- Interval
4 months ago
Rob Hallam
558739a0cd
feat: add __init__, TestOverlapConsolidation suite
4 months ago
Rob Hallam
05a67c6264
feat: add context to ease testing
4 months ago