Skip to content

Video editing with Python

Test issue 407 (video has a valid fps after concatenate function) (#443)

Billy Earney09d35726b6cb
diff --git a/tests/test_issues.py b/tests/test_issues.py
index c00f3388..3a0be935 100644
--- a/tests/test_issues.py
+++ b/tests/test_issues.py
@@ -23,6 +23,8 @@ def download_youtube_video(url, filename):
def test_download_media(capsys):
+ global knights, knights10
+
with capsys.disabled():
download_youtube_video("zvCvOC2VwDc", "media/knights.mp4")
@@ -30,11 +32,24 @@ def test_download_media(capsys):
knights10 = knights.subclip(60,70)
-
def test_issue_145():
with pytest.raises(Exception, message="Expecting Exception"):
_final = concatenation([knights10], method = 'composite')
+def test_issue_407():
+ assert round(knights.fps) == 30
+ assert knights10.fps == knights.fps
+
+ _text=TextClip("blah").set_duration(2) #TextClip has no fps attribute
+
+ _video=concatenate_videoclips([_text, knights10, knights10])
+ assert _video.fps == knights10.fps
+
+ # uncomment when PR 416 is merged.
+ #_video=concatenate_videoclips([_text])
+ #assert _video.fps == None
+
+
def test_PR_306():
assert TextClip.list('font') != []
assert TextClip.list('color') != []