Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify tests to use ColorClip's new color argument (instead of col) #457

Merged
6 commits merged into from Mar 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/test_VideoFileClip.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import os

def test_setup():
red = ColorClip((1024,800), col=(255,0,0))
green = ColorClip((1024,800), col=(0,255,0))
blue = ColorClip((1024,800), col=(0,0,255))
red = ColorClip((1024,800), color=(255,0,0))
green = ColorClip((1024,800), color=(0,255,0))
blue = ColorClip((1024,800), color=(0,0,255))

red.fps=green.fps=blue.fps=30
video = clips_array([[red, green, blue]]).set_duration(5)
Expand All @@ -19,4 +19,4 @@ def test_setup():
assert clip.size == [1024*3, 800]

if __name__ == '__main__':
pytest.main()
pytest.main()
12 changes: 6 additions & 6 deletions tests/test_compositing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from moviepy.editor import *

def test_clips_array():
red = ColorClip((1024,800), col=(255,0,0))
green = ColorClip((1024,800), col=(0,255,0))
blue = ColorClip((1024,800), col=(0,0,255))
red = ColorClip((1024,800), color=(255,0,0))
green = ColorClip((1024,800), color=(0,255,0))
blue = ColorClip((1024,800), color=(0,0,255))

video = clips_array([[red, green, blue]])

Expand All @@ -14,9 +14,9 @@ def test_clips_array():


def test_clips_array():
red = ColorClip((1024,800), col=(255,0,0))
green = ColorClip((1024,800), col=(0,255,0))
blue = ColorClip((1024,800), col=(0,0,255))
red = ColorClip((1024,800), color=(255,0,0))
green = ColorClip((1024,800), color=(0,255,0))
blue = ColorClip((1024,800), color=(0,0,255))

video = clips_array([[red, green, blue]]).set_duration(5)

Expand Down
13 changes: 7 additions & 6 deletions tests/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,24 @@ def test_download_media(capsys):
download_media.download()

def test_issue_145():
video = ColorClip((800, 600), col=(255,0,0)).set_duration(5)
video = ColorClip((800, 600), color=(255,0,0)).set_duration(5)
with pytest.raises(Exception, message="Expecting Exception"):
final = concatenate_videoclips([_video], method = 'composite')
final = concatenate_videoclips([video], method = 'composite')

def test_issue_407():
red = ColorClip((800, 600), col=(255,0,0)).set_duration(5)
red = ColorClip((800, 600), color=(255,0,0)).set_duration(5)
red.fps=30
assert round(red.fps) == 30

green=ColorClip((640, 480), col=(0,255,0)).set_duration(2) #ColorClip has no fps attribute
blue=ColorClip((640, 480), col=(0,0,255)).set_duration(2) #ColorClip has no fps attribute
#ColorClip has no fps attribute
green=ColorClip((640, 480), color=(0,255,0)).set_duration(2)
blue=ColorClip((640, 480), color=(0,0,255)).set_duration(2)

video=concatenate_videoclips([red, green, blue])
assert video.fps == red.fps

def test_issue_416():
green=ColorClip((640, 480), col=(0,255,0)).set_duration(2) #ColorClip has no fps attribute
green=ColorClip((640, 480), color=(0,255,0)).set_duration(2) #ColorClip has no fps attribute
video1=concatenate_videoclips([green])
assert video1.fps == None

Expand Down