Skip to content

Commit

Permalink
change ColorClips col argument to color in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bearney74 committed Mar 2, 2017
1 parent adcbcca commit cadfd83
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
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

0 comments on commit cadfd83

Please sign in to comment.