Commit 371f6c8f authored by F-G Fernandez's avatar F-G Fernandez Committed by Francisco Massa
Browse files

test: Updated asserts in test_io (#1496)

* test: Updated asserts in test_io

Updated all raw asserts to corresponding unittest.TestCase.assert. See #1483

* test: Fixed test_io

In order to use unittest.TestCase for asserts in temp_video, the object has to be passed itself to temp_video.

* test: Updated asserts to AssertionError

Switched initial raw assert to AssertionError.

* test: Changed AssertionError for ValueError
parent 2804c122
......@@ -53,8 +53,10 @@ def _create_video_frames(num_frames, height, width):
@contextlib.contextmanager
def temp_video(num_frames, height, width, fps, lossless=False, video_codec=None, options=None):
if lossless:
assert video_codec is None, "video_codec can't be specified together with lossless"
assert options is None, "options can't be specified together with lossless"
if video_codec is not None:
raise ValueError("video_codec can't be specified together with lossless")
if options is not None:
raise ValueError("options can't be specified together with lossless")
video_codec = 'libx264rgb'
options = {'crf': '0'}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment