-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #431 from earney/pytest
test for issue #145
- Loading branch information
Showing
3 changed files
with
38 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,3 +50,5 @@ nosetests.xml | |
|
||
# JetBrains | ||
.idea | ||
|
||
tests/media |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |