Skip to content

Video editing with Python

Merge branch 'master' into issue417

Billy Earneyff44f230a4de
diff --cc tests/test_issues.py
index 36c45a19,d0225774..1fd8d65b
--- a/tests/test_issues.py
+++ b/tests/test_issues.py
@@@ -7,10 -7,9 +7,9 @@@ import pytes
from moviepy.editor import *
-
global knights, knights10
-def download_youtube_video(url, filename):
+def download_url(url, filename):
if not os.path.exists(filename):
print("\nDownloading %s\n" % filename)
download_webfile(url, filename)
@@@ -34,15 -29,20 +33,28 @@@ def test_download_media(capsys)
def test_issue_145():
with pytest.raises(Exception, message="Expecting Exception"):
_final = concatenation([knights10], method = 'composite')
-
++
+def test_issue_417():
+ # failed in python2
+
+ cad = u'media/python_logo.png'
+ myclip = ImageClip(cad).fx(vfx.resize, newsize=[1280, 660])
+ final = CompositeVideoClip([myclip], size=(1280, 720))
+ #final.set_duration(7).write_videofile("test.mp4", fps=30)
+ 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
+
+
if __name__ == '__main__':
pytest.main()