Skip to content

Commit

Permalink
Merge pull request #431 from earney/pytest
Browse files Browse the repository at this point in the history
test for issue #145
  • Loading branch information
bearney74 committed Feb 21, 2017
2 parents 5ef16e9 + 19d4f03 commit d3582b1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ nosetests.xml

# JetBrains
.idea

tests/media
10 changes: 0 additions & 10 deletions tests/test_install.py

This file was deleted.

36 changes: 36 additions & 0 deletions tests/test_issues.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""
Tests meant to be run with pytest
"""

import sys
import os
import pytest

from moviepy.editor import *


#@pytest.fixture
#def example_video1():
# pass

global knights, knights10

def download_youtube_video(url, filename):
if not os.path.exists(filename):
print("\nDownloading %s\n" % filename)
download_webfile(url, filename)
print("Downloading complete...\n")


def test_download_media(capsys):
with capsys.disabled():
download_youtube_video("zvCvOC2VwDc", "media/knights.mp4")

knights=VideoFileClip("media/knights.mp4")
knights10 = knights.subclip(60,70)



def test_issue_145():
with pytest.raises(Exception, message="Expecting Exception"):
_final = concatenation([knights10], method = 'composite')

0 comments on commit d3582b1

Please sign in to comment.