Commit def5eb70 authored by André Anjos's avatar André Anjos 💬
Browse files

Move required functions to test_docker

parent 171f6764
Pipeline #19519 canceled with stages
in 1 minute and 43 seconds
......@@ -38,20 +38,7 @@ from ..common import Selector
from ..scripts.beat import main
from beat.core.test.utils import slow, cleanup, skipif
from beat.core.algorithm import Storage
from beat.core.database import Database
from beat.backend.python.hash import hashDataset
from beat.backend.python.hash import toPath
def index_db_from_instructions(input_field):
database = Database(prefix, input_field['database'])
view = database.view(input_field['protocol'], input_field['set'])
filename = toPath(hashDataset(input_field['database'],
input_field['protocol'],
input_field['set']),
suffix='.db')
view.index(os.path.join(tmp_prefix, filename))
def call(*args, **kwargs):
'''A central mechanism to call the main routine with the right parameters'''
......
......@@ -36,6 +36,10 @@ from beat.core.test.utils import slow, cleanup, skipif
import nose.tools
from beat.backend.python.hash import hashDataset
from beat.backend.python.hash import toPath
from beat.core.database import Database
from .test_algorithms import call as call_algo
from .test_experiments import call as call_xp
from . import tmp_prefix
......@@ -44,6 +48,16 @@ from . import tmp_prefix
instructions_dir = pkg_resources.resource_filename(__name__, 'instructions')
def index_db_from_instructions(input_field):
database = Database(prefix, input_field['database'])
view = database.view(input_field['protocol'], input_field['set'])
filename = toPath(hashDataset(input_field['database'],
input_field['protocol'],
input_field['set']),
suffix='.db')
view.index(os.path.join(tmp_prefix, filename))
@slow
@nose.tools.with_setup(teardown=cleanup)
def test_execute_algorithm_using_database():
......
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