Commit 325bf8a8 authored by Olegs NIKISINS's avatar Olegs NIKISINS
Browse files

Added unit test for the load method of youtube database

parent 26a94a36
Pipeline #13924 failed with stages
in 9 minutes
......@@ -24,6 +24,9 @@ import
from import db_available
from import check_database_zt
from import _check_annotations
import pkg_resources
from import YoutubeBioFile
import os
......@@ -49,3 +52,25 @@ def test_mobio():
except IOError as e:
raise SkipTest(
"The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'" % e)
class YoutubeFile(object):
def __init__(self, client_id, path, id):
self.client_id = client_id
self.path = path = id
def test_youtube_load_method():
Test the load method of the YoutubeBioFile class.
f = YoutubeFile(1, "", 1)
youtube_bio_file = YoutubeBioFile(f)
test_file = pkg_resources.resource_filename('', 'test/data/sand_face/image_2.png')
directory = os.path.split(test_file)[0]
frame_container = youtube_bio_file.load(directory=directory, extension=".jpg")
assert (len(frame_container)==2)
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