def test_PR_610(): """Test that the max fps of video clips is used for the composite video clip.""" clip1 = ColorClip((640, 480), color=(255, 0, 0)).with_duration(1) clip2 = ColorClip((640, 480), color=(0, 255, 0)).with_duration(1) clip1.fps = 24 clip2.fps = 25 composite = CompositeVideoClip([clip1, clip2]) assert composite.fps == 25
def test_PR_610(): """ Test that the max fps of the video clips is used for the composite video clip """ clip1 = ColorClip((640, 480), color=(255, 0, 0)).set_duration(1) clip2 = ColorClip((640, 480), color=(0, 255, 0)).set_duration(1) clip1.fps = 24 clip2.fps = 25 composite = CompositeVideoClip([clip1, clip2]) assert composite.fps == 25
def test_issue_407(): red = ColorClip((800, 600), color=(255, 0, 0)).with_duration(5) red.fps = 30 assert red.fps == 30 assert red.w == 800 assert red.h == 600 assert red.size == (800, 600) # ColorClip has no fps attribute. green = ColorClip((640, 480), color=(0, 255, 0)).with_duration(2) blue = ColorClip((640, 480), color=(0, 0, 255)).with_duration(2) assert green.w == blue.w == 640 assert green.h == blue.h == 480 assert green.size == blue.size == (640, 480) with pytest.raises(AttributeError): green.fps with pytest.raises(AttributeError): blue.fps video = concatenate_videoclips([red, green, blue]) assert video.fps == red.fps