Skip to content

Commit

Permalink
Added a unit test for calculating Source Out in the presence of TimeW…
Browse files Browse the repository at this point in the history
…arp retiming effects.

Signed-off-by: Nikita Glukhov <[email protected]>
  • Loading branch information
ghost-luck committed Nov 3, 2022
1 parent 9816a14 commit 9315c8d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/sample_data/source_out_timewarp.edl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TITLE: SOURCE_OUT_TIMEWARP
FCM: NON-DROP FRAME
000001 B113RPTW V C 00:32:02:06 00:32:06:19 01:34:53:09 01:34:57:13
M2 B113RPTW 026.4 00:32:02:06
12 changes: 12 additions & 0 deletions tests/test_cmx_3600_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
MULTIPLE_TARGET_AUDIO_PATH = os.path.join(SAMPLE_DATA_DIR, "multi_audio.edl")
TRANSITION_DURATION_TEST = os.path.join(SAMPLE_DATA_DIR, "transition_duration.edl")
ENABLED_TEST = os.path.join(SAMPLE_DATA_DIR, "enabled.otio")
SOURCE_OUT_TIMEWARP_TEST = os.path.join(SAMPLE_DATA_DIR, "source_out_timewarp.edl")


class EDLAdapterTest(unittest.TestCase, otio_test_utils.OTIOAssertions):
Expand Down Expand Up @@ -1252,6 +1253,17 @@ def test_enabled(self):

self.assertMultiLineEqual(result, expected)

def test_source_out_timewarp(self):
tl = otio.adapters.read_from_file(SOURCE_OUT_TIMEWARP_TEST)
result = otio.adapters.write_to_string(tl, adapter_name="cmx_3600")
expected = r'''TITLE: SOURCE_OUT_TIMEWARP
001 B113RPTW V C 00:32:02:06 00:32:06:19 01:34:53:09 01:34:57:13
M2 000001 26.4 00:32:02:06
* FROM CLIP NAME: 000001
'''
self.assertMultiLineEqual(result, expected)


if __name__ == "__main__":
unittest.main()

0 comments on commit 9315c8d

Please sign in to comment.