Files
galaxy/test/functional/test_data_managers.py
T
Nicola Soranzo 5ca0aea54a Drop nose
It's deprecated and unmaintained, and is broken under Python 3.10 .
2022-11-01 18:45:07 +00:00

42 lines
1.1 KiB
Python

import logging
from .test_toolbox import (
build_tests as _build_tests,
ToolTestCase,
)
log = logging.getLogger(__name__)
data_managers = None
class DataManagerToolTestCase(ToolTestCase):
"""Test case that runs Data Manager tests based on a `galaxy.tools.test.ToolTest`"""
def build_tests(
tmp_dir=None, testing_shed_tools=False, master_api_key=None, user_api_key=None, create_admin=False, user_email=None
):
"""
If the module level variable `data_managers` is set, generate `DataManagerToolTestCase`
classes for all of its tests and put them into this modules globals() so
they can be discovered by nose.
"""
if data_managers is None:
log.warning("data_managers was not set for Data Manager functional testing. Will not test.")
return
G = globals()
_build_tests(
testing_shed_tools=testing_shed_tools,
master_api_key=master_api_key,
user_api_key=user_api_key,
name_prefix="TestForDataManagerTool_",
baseclass=DataManagerToolTestCase,
user_email=user_email,
create_admin=create_admin,
G=G,
contains="data_manager",
)