From 0b64442ed3d06bd7fdf9f0fbb53520d28e9332b9 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 22 Aug 2018 18:46:52 +0200 Subject: [PATCH 01/13] Skip tool tests in test/functional/known_broken_tools.txt --- test/functional/known_broken_tools.txt | 11 +++++++++++ test/functional/test_toolbox_pytest.py | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 test/functional/known_broken_tools.txt diff --git a/test/functional/known_broken_tools.txt b/test/functional/known_broken_tools.txt new file mode 100644 index 00000000000..506709a36fb --- /dev/null +++ b/test/functional/known_broken_tools.txt @@ -0,0 +1,11 @@ +# Deprecated, IUC provides same tool, kept for backwards compat? +Extract genomic DNA 1 +# Relies on data table, but data table not available +Interval2Maf1 +Interval2Maf_pairwise1 +maf_stats1 +Interval_Maf_Merged_Fasta2 +# No dependency available +hgv_lps +# Some weird parameter issue +maf_by_block_number1 diff --git a/test/functional/test_toolbox_pytest.py b/test/functional/test_toolbox_pytest.py index c3e32a2294b..5043609d78b 100644 --- a/test/functional/test_toolbox_pytest.py +++ b/test/functional/test_toolbox_pytest.py @@ -7,6 +7,7 @@ sys.path[1:1] = [os.path.join(galaxy_root, "lib"), os.path.join(galaxy_root, "te import pytest from base import driver_util +SKIPTEST = os.path.join(os.path.dirname(__file__), 'known_broken_tools.txt') TEST_PREFIX = 'TestForTool_' @@ -22,6 +23,12 @@ class DefaultGalaxyTestDriver(driver_util.GalaxyTestDriver): return self.build_tool_tests(return_test_classes=True) +def get_skiplist(): + with open(SKIPTEST) as skiptest: + skiplist = [l.strip() for l in skiptest if l.strip() and not l.startswith('#')] + return skiplist + + def galaxy_driver(): driver = DefaultGalaxyTestDriver() driver.setup() @@ -40,13 +47,16 @@ def cases(): # but that's not compatible with the use use of pytest.mark.parametrize global DRIVER DRIVER = galaxy_driver() + skiplist = get_skiplist() tests = DRIVER.build_tests() for test_name, test_class in tests.items(): if test_name.startswith(TEST_PREFIX): test_class.runTest = lambda : None test_instance = test_class() - for index in range(test_instance.test_count): - yield (test_name[len(TEST_PREFIX):] + "_test_%d" % (index + 1), test_instance, index) + if test_instance.tool_id not in skiplist: + # TODO: mark this as skip instead of not collecting the test + for index in range(test_instance.test_count): + yield (test_name[len(TEST_PREFIX):] + "_test_%d" % (index + 1), test_instance, index) def idfn(val): From 300ab73c10332968a98eb5f77a85abc66a3f4686 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Aug 2018 11:41:11 +0200 Subject: [PATCH 02/13] Mark skipped tests instead of not collecting them Also marks tests as tool or data_manager, so `pytest -m ` can be used to select a subset of tests. --- pytest.ini | 9 ++++++--- test/functional/test_toolbox_pytest.py | 24 ++++++++++++++++++------ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/pytest.ini b/pytest.ini index cf83b3d43cb..eaab77330bd 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,7 @@ [pytest] -log_cli=true -log_level=DEBUG -python_paths=lib +log_cli = true +log_level = DEBUG +python_paths = lib +markers = + data_manager: marks test as a data_manager test + tool: marks test as a tool test diff --git a/test/functional/test_toolbox_pytest.py b/test/functional/test_toolbox_pytest.py index 5043609d78b..838e07dd9db 100644 --- a/test/functional/test_toolbox_pytest.py +++ b/test/functional/test_toolbox_pytest.py @@ -41,22 +41,34 @@ def driver(request): return DRIVER -def cases(): +def get_cases(): # We setup a global driver, so that the driver fixture can tear down the driver # Ideally `galaxy_driver` or `cases` would be fixtures and clean up after the yield, # but that's not compatible with the use use of pytest.mark.parametrize global DRIVER DRIVER = galaxy_driver() - skiplist = get_skiplist() tests = DRIVER.build_tests() + cases = [] for test_name, test_class in tests.items(): if test_name.startswith(TEST_PREFIX): test_class.runTest = lambda : None test_instance = test_class() - if test_instance.tool_id not in skiplist: - # TODO: mark this as skip instead of not collecting the test - for index in range(test_instance.test_count): - yield (test_name[len(TEST_PREFIX):] + "_test_%d" % (index + 1), test_instance, index) + cases.append(test_instance) + return cases + + +def cases(): + skiplist = get_skiplist() + for test_instance in get_cases(): + for index in range(test_instance.test_count): + test = (test_instance.tool_id + "_test_%d" % (index + 1), test_instance, index) + marks = [] + marks.append(pytest.mark.skipif(test_instance.tool_id in skiplist, reason="tool in skiplist")) + if 'data_manager_' in test_instance.tool_id: + marks.append(pytest.mark.data_manager(test)) + else: + marks.append(pytest.mark.tool(test)) + yield pytest.param(test, marks=marks) def idfn(val): From 6f299202313c3b40d357468e9ba0e9b32f858038 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Aug 2018 13:16:59 +0200 Subject: [PATCH 03/13] Use pytest for -framework, -installed, -data_manager, -migrated tests --- run_tests.sh | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 17a1f63a6aa..8c5ec2c18dc 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -421,19 +421,33 @@ do shift 2 ;; -f|-framework|--framework) + marker="-m tool" + with_framework_test_tools_arg="-with_framework_test_tools" + test_script="pytest" report_file="run_framework_tests.html" framework_test=1; shift 1 ;; -d|-data_managers|--data_managers) + marker="-m data_manager" + test_script="pytest" + report_file="run_data_managers_tests.html" data_managers_test=1; shift 1 ;; -m|-migrated|--migrated) + with_framework_test_tools_arg="-migrated" + marker="-m tool" + test_script="pytest" + report_file="run_migrated_tests.html" migrated_test=1; shift ;; -i|-installed|--installed) + with_framework_test_tools_arg="-shed" + marker="-m tool" + test_script="pytest" + report_file="run_installed_tests.html" installed_test=1; shift ;; @@ -578,29 +592,17 @@ fi setup_python -if [ -n "$migrated_test" ] ; then - [ -n "$test_id" ] && class=":TestForTool_$test_id" || class="" - extra_args="functional.test_toolbox$class -migrated" -elif [ -n "$installed_test" ] ; then - [ -n "$test_id" ] && class=":TestForTool_$test_id" || class="" - extra_args="functional.test_toolbox$class -installed" -elif [ -n "$framework_test" ] ; then - [ -n "$test_id" ] && class=":TestForTool_$test_id" || class="" - extra_args="functional.test_toolbox$class -framework" +if [ -n "$framework_test" -o -n "$installed_test" -o -n "$migrated_test" -o -n "$data_managers_test" ] ; then + [ -n "$test_id" ] && selector="-k $test_id" || selector="" + extra_args="test/functional/test_toolbox_pytest.py $selector $marker" elif [ -n "$selenium_test" ] ; then extra_args="$selenium_script -selenium" -elif [ -n "$data_managers_test" ] ; then - [ -n "$test_id" ] && class=":TestForDataManagerTool_$test_id" || class="" - extra_args="functional.test_data_managers$class -data_managers" elif [ -n "$toolshed_script" ]; then extra_args="$toolshed_script" elif [ -n "$api_script" ]; then extra_args="$api_script" elif [ -n "$section_id" ]; then extra_args=`python tool_list.py $section_id` -elif [ -n "$test_id" ]; then - class=":TestForTool_$test_id" - extra_args="functional.test_toolbox$class" elif [ -n "$unit_extra" ]; then extra_args="--with-doctest $unit_extra" elif [ -n "$integration_extra" ]; then @@ -627,8 +629,14 @@ if [ -n "$structured_data_report_file" ]; then else structured_data_args="" fi -if [ -n "$with_framework_test_tools_arg" ]; then - GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml" +if [ "$with_framework_test_tools_arg" ]; then + if [ "$with_framework_test_tools_arg" == "-with_framework_test_tools" ]; then + GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml" + elif [ "$with_framework_test_tools_arg" == "-migrated" ]; then + GALAXY_TEST_TOOL_CONF="config/migrated_tools_conf.xml" + elif [ "$with_framework_test_tools_arg" == "-shed" ]; then + GALAXY_TEST_TOOL_CONF="config/shed_tool_conf.xml" + fi export GALAXY_TEST_TOOL_CONF fi if [ "$test_script" = 'pytest' ]; then From 546b90a6985cc6a8e4d87482778c8ac275c9903f Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Aug 2018 13:34:15 +0200 Subject: [PATCH 04/13] Add additional test target for tools in tool_conf.xml.main --- run_tests.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/run_tests.sh b/run_tests.sh index 8c5ec2c18dc..fe89e5286dd 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -428,6 +428,14 @@ do framework_test=1; shift 1 ;; + -main|-main_tools|--main_tools) + marker="-m tool" + with_framework_test_tools_arg="-with_main_tools" + test_script="pytest" + report_file="run_framework_tests.html" + framework_test=1; + shift 1 + ;; -d|-data_managers|--data_managers) marker="-m data_manager" test_script="pytest" @@ -636,6 +644,8 @@ if [ "$with_framework_test_tools_arg" ]; then GALAXY_TEST_TOOL_CONF="config/migrated_tools_conf.xml" elif [ "$with_framework_test_tools_arg" == "-shed" ]; then GALAXY_TEST_TOOL_CONF="config/shed_tool_conf.xml" + elif [ "$with_framework_test_tools_arg" == "-with_main_tools" ]; then + GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.main" fi export GALAXY_TEST_TOOL_CONF fi From e73257f8ed2556a94a6e58efff62ed1873709f42 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Aug 2018 13:42:54 +0200 Subject: [PATCH 05/13] Set conda_auto_init and conda_auto_install to true for pytest driver --- test/functional/test_toolbox_pytest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/functional/test_toolbox_pytest.py b/test/functional/test_toolbox_pytest.py index 838e07dd9db..44417feb380 100644 --- a/test/functional/test_toolbox_pytest.py +++ b/test/functional/test_toolbox_pytest.py @@ -17,6 +17,8 @@ class DefaultGalaxyTestDriver(driver_util.GalaxyTestDriver): Just populate non-shed tool tests and run tests. Works for tool tests, regular twill tests, and API testing. """ + conda_auto_init = True + conda_auto_install = True def build_tests(self): """Build framework tool test methods.""" From 7f807ce971e8d743dca0f0438e5ce078f742ec65 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Aug 2018 14:00:23 +0200 Subject: [PATCH 06/13] Fix shell syntax --- run_tests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index fe89e5286dd..b944d6f59c2 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -638,13 +638,13 @@ else structured_data_args="" fi if [ "$with_framework_test_tools_arg" ]; then - if [ "$with_framework_test_tools_arg" == "-with_framework_test_tools" ]; then + if [ "$with_framework_test_tools_arg" = "-with_framework_test_tools" ]; then GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml" - elif [ "$with_framework_test_tools_arg" == "-migrated" ]; then + elif [ "$with_framework_test_tools_arg" = "-migrated" ]; then GALAXY_TEST_TOOL_CONF="config/migrated_tools_conf.xml" - elif [ "$with_framework_test_tools_arg" == "-shed" ]; then + elif [ "$with_framework_test_tools_arg" = "-shed" ]; then GALAXY_TEST_TOOL_CONF="config/shed_tool_conf.xml" - elif [ "$with_framework_test_tools_arg" == "-with_main_tools" ]; then + elif [ "$with_framework_test_tools_arg" = "-with_main_tools" ]; then GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.main" fi export GALAXY_TEST_TOOL_CONF From 9099e73a3e00658082891fae7ea3de0774cce2ad Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Aug 2018 17:16:42 +0200 Subject: [PATCH 07/13] Add include-ignored, otherwise spams stderr out --- .coveragerc | 1 + 1 file changed, 1 insertion(+) diff --git a/.coveragerc b/.coveragerc index 26050442d35..53c47a947f1 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,4 @@ [run] branch = True include = lib/galaxy/* +disable_warnings = include-ignored From d476fcc072dbcb8e3b19f511dc43ae731e7c97e0 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Aug 2018 18:14:50 +0200 Subject: [PATCH 08/13] Fix LocalShell on python3 --- lib/galaxy/jobs/runners/util/kill.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/jobs/runners/util/kill.py b/lib/galaxy/jobs/runners/util/kill.py index 1a458c63913..a95d7e0b51c 100644 --- a/lib/galaxy/jobs/runners/util/kill.py +++ b/lib/galaxy/jobs/runners/util/kill.py @@ -23,7 +23,7 @@ def _psutil_kill_pid(pid): """ try: parent = Process(pid) - for child in parent.get_children(recursive=True): + for child in parent.children(recursive=True): child.kill() parent.kill() except NoSuchProcess: From 1c64cdd674fcbfc0f077f5d31947dd9b6c6e9149 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Aug 2018 18:27:57 +0200 Subject: [PATCH 09/13] Use pytest to run unit and doctests --- pytest.ini | 2 +- run_tests.sh | 7 ++++--- tox.ini | 4 ---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/pytest.ini b/pytest.ini index eaab77330bd..6479864e5de 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -log_cli = true +addopts = --doctest-continue-on-failure log_level = DEBUG python_paths = lib markers = diff --git a/run_tests.sh b/run_tests.sh index b944d6f59c2..1b3171850cd 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -506,12 +506,13 @@ do ;; -u|-unit|--unit) report_file="run_unit_tests.html" - test_script="./scripts/nosetests.py" + test_script="pytest" + unit_extra='--doctest-modules --ignore lib/galaxy/webapps/tool_shed/controllers --ignore lib/galaxy/jobs/runners/chronos.py --ignore lib/galaxy/webapps/tool_shed/model/migrate --ignore lib/galaxy/util/jstree.py' if [ $# -gt 1 ]; then - unit_extra=$2 + unit_extra="$unit_extra $2" shift 2 else - unit_extra='--exclude=functional --exclude="^get" --exclude=controllers --exclude=runners --exclude dictobj --exclude=jstree lib test/unit' + unit_extra="$unit_extra lib test/unit" shift 1 fi ;; diff --git a/tox.ini b/tox.ini index 7f75187d83f..03d5632475c 100644 --- a/tox.ini +++ b/tox.ini @@ -42,8 +42,6 @@ setenv = GALAXY_VIRTUAL_ENV={envdir} GALAXY_ENABLE_BETA_COMPRESSED_GENBANK_SNIFFING=1 deps = - nose - NoseHTML mock mock-ssh-server @@ -65,8 +63,6 @@ whitelist_externals = bash setenv = GALAXY_VIRTUAL_ENV={envdir} deps = - nose - NoseHTML mock mock-ssh-server From 1152a19fd2cd5d6589becde3c7ebdd6435a33cff Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Aug 2018 18:30:05 +0200 Subject: [PATCH 10/13] Use pytest-cov for testing coverage --- run_tests.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 1b3171850cd..933ffdda4e6 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -273,6 +273,7 @@ DOCKER_DEFAULT_IMAGE='galaxy/testing-base:18.09.0' test_script="./scripts/functional_tests.py" report_file="run_functional_tests.html" +coverage_arg="" xunit_report_file="" structured_data_report_file="" with_framework_test_tools_arg="" @@ -368,6 +369,7 @@ do api_script="./test/api" shift 1 fi + coverage_file="api_coverage.xml" ;; -selenium|--selenium) with_framework_test_tools_arg="-with_framework_test_tools" @@ -425,6 +427,7 @@ do with_framework_test_tools_arg="-with_framework_test_tools" test_script="pytest" report_file="run_framework_tests.html" + coverage_file="framework_coverage.xml" framework_test=1; shift 1 ;; @@ -433,6 +436,7 @@ do with_framework_test_tools_arg="-with_main_tools" test_script="pytest" report_file="run_framework_tests.html" + coverage_file="main_tools_coverage.xml" framework_test=1; shift 1 ;; @@ -440,6 +444,7 @@ do marker="-m data_manager" test_script="pytest" report_file="run_data_managers_tests.html" + coverage_file="data_managers_coverage.xml" data_managers_test=1; shift 1 ;; @@ -448,6 +453,7 @@ do marker="-m tool" test_script="pytest" report_file="run_migrated_tests.html" + coverage_file="migrated_coverage.xml" migrated_test=1; shift ;; @@ -456,6 +462,7 @@ do marker="-m tool" test_script="pytest" report_file="run_installed_tests.html" + coverage_file="installed_coverage.xml" installed_test=1; shift ;; @@ -515,6 +522,7 @@ do unit_extra="$unit_extra lib test/unit" shift 1 fi + coverage_file="unit_coverage.xml" ;; -i|-integration|--integration) test_script="pytest" @@ -525,6 +533,7 @@ do else integration_extra="./test/integration" shift 1 + coverage_file="integration_coverage.xml" fi ;; --no_cleanup) @@ -613,7 +622,7 @@ elif [ -n "$api_script" ]; then elif [ -n "$section_id" ]; then extra_args=`python tool_list.py $section_id` elif [ -n "$unit_extra" ]; then - extra_args="--with-doctest $unit_extra" + extra_args="$unit_extra" elif [ -n "$integration_extra" ]; then extra_args="$integration_extra" elif [ -n "$test_target" ] ; then @@ -651,7 +660,10 @@ if [ "$with_framework_test_tools_arg" ]; then export GALAXY_TEST_TOOL_CONF fi if [ "$test_script" = 'pytest' ]; then - python -m "$test_script" -v --html "$report_file" $xunit_args $extra_args "$@" + if [ "$coverage_arg" = "--with_coverage" ]; then + coverage_arg="--cov-report term --cov-report xml:cov-unit.xml --cov=lib" + fi + "$test_script" -v --html "$report_file" $coverage_arg $xunit_args $extra_args "$@" else python $test_script $coverage_arg -v --with-nosehtml --html-report-file $report_file $xunit_args $structured_data_args $extra_args "$@" fi From 66c64ccfe46cfd91bcffabaf2b4bddd7b86cef91 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Aug 2018 18:43:17 +0200 Subject: [PATCH 11/13] Adapt dynamic_tool_destination unit tests to pytest as driver The log capturing seems to be a bit different --- .../test_dynamic_tool_destination.py | 152 +++++++++--------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/test/unit/jobs/dynamic_tool_destination/test_dynamic_tool_destination.py b/test/unit/jobs/dynamic_tool_destination/test_dynamic_tool_destination.py index a46dc566b64..d9f686dc3aa 100644 --- a/test/unit/jobs/dynamic_tool_destination/test_dynamic_tool_destination.py +++ b/test/unit/jobs/dynamic_tool_destination/test_dynamic_tool_destination.py @@ -97,7 +97,7 @@ class TestDynamicToolDestination(unittest.TestCase): def test_brokenDestYML(self, l): self.assertRaises(JobMappingException, map_tool_to_destination, runJob, theApp, vanillaTool, "user@email.com", True, broken_default_dest_path, job_conf_path) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'No global default destination specified in config!'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), @@ -110,7 +110,7 @@ class TestDynamicToolDestination(unittest.TestCase): self.assertRaises(JobMappingException, map_tool_to_destination, emptyJob, theApp, vanillaTool, "user@email.com", True, path, job_conf_path) self.assertRaises(JobMappingException, map_tool_to_destination, emptyJob, theApp, vanillaTool, "user@email.com", True, priority_path, job_conf_path) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Loading file: input1' + script_dir + '/data/test.empty'), @@ -129,7 +129,7 @@ class TestDynamicToolDestination(unittest.TestCase): self.assertRaises(JobMappingException, map_tool_to_destination, zeroJob, theApp, vanillaTool, "user@email.com", True, path, job_conf_path) self.assertRaises(JobMappingException, map_tool_to_destination, zeroJob, theApp, vanillaTool, "user@email.com", True, priority_path, job_conf_path) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Total size: 0.00 B'), @@ -146,7 +146,7 @@ class TestDynamicToolDestination(unittest.TestCase): self.assertRaises(JobMappingException, map_tool_to_destination, failJob, theApp, vanillaTool, "user@email.com", True, path, job_conf_path) self.assertRaises(JobMappingException, map_tool_to_destination, failJob, theApp, vanillaTool, "user@email.com", True, priority_path, job_conf_path) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Loading file: input1' + script_dir + '/data/test1.full'), @@ -167,7 +167,7 @@ class TestDynamicToolDestination(unittest.TestCase): priority_job = map_tool_to_destination(runJob, theApp, vanillaTool, "user@email.com", True, priority_path, job_conf_path) self.assertEquals(priority_job, 'Destination1_high') - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Loading file: input1' + script_dir + '/data/test3.full'), @@ -190,7 +190,7 @@ class TestDynamicToolDestination(unittest.TestCase): priority_job = map_tool_to_destination(runJob, theApp, defaultTool, "user@email.com", True, priority_path, job_conf_path) self.assertEquals(priority_job, 'cluster_default_high') - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Tool 'test_tooldefault' not specified in config. Using default destination."), @@ -209,7 +209,7 @@ class TestDynamicToolDestination(unittest.TestCase): priority_job = map_tool_to_destination(argJob, theApp, argTool, "user@email.com", True, priority_path, job_conf_path) self.assertEquals(priority_job, 'Destination6_med') - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Running 'test_arguments' with 'Destination6'."), @@ -226,7 +226,7 @@ class TestDynamicToolDestination(unittest.TestCase): priority_job = map_tool_to_destination(argNotFoundJob, theApp, argTool, "user@email.com", True, priority_path, job_conf_path) self.assertEquals(priority_job, 'cluster_default_high') - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Running 'test_arguments' with 'cluster_default'."), @@ -243,7 +243,7 @@ class TestDynamicToolDestination(unittest.TestCase): priority_job = map_tool_to_destination(runJob, theApp, unTool, "user@email.com", True, priority_path, job_conf_path) self.assertEquals(priority_job, 'cluster_default_high') - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Tool 'unregistered' not specified in config. Using default destination."), @@ -262,7 +262,7 @@ class TestDynamicToolDestination(unittest.TestCase): priority_job = map_tool_to_destination(dbJob, theApp, dbTool, "user@email.com", True, priority_path, job_conf_path) self.assertEquals(priority_job, 'Destination4_high') - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Loading file: input1' + script_dir + '/data/test.fasta'), @@ -283,7 +283,7 @@ class TestDynamicToolDestination(unittest.TestCase): priority_job = map_tool_to_destination(dbcountJob, theApp, dbTool, "user@email.com", True, priority_path, job_conf_path) self.assertEquals(priority_job, 'Destination4_high') - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Loading file: input1' + script_dir + '/data/test.fasta'), @@ -302,7 +302,7 @@ class TestDynamicToolDestination(unittest.TestCase): job = map_tool_to_destination(runJob, theApp, noVBTool, "user@email.com", True, no_verbose_path, job_conf_path) self.assertEquals(job, 'Destination1') - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Running 'test_no_verbose' with 'Destination1'.") ) @@ -311,7 +311,7 @@ class TestDynamicToolDestination(unittest.TestCase): job = map_tool_to_destination(runJob, theApp, usersTool, "user@email.com", True, users_test_path, job_conf_path) self.assertEquals(job, 'special_cluster') - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Running 'test_users' with 'special_cluster'."), ) @@ -320,7 +320,7 @@ class TestDynamicToolDestination(unittest.TestCase): job = map_tool_to_destination(runJob, theApp, usersTool, "userblah@email.com", True, users_test_path, job_conf_path) self.assertEquals(job, 'lame_cluster') - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Running 'test_users' with 'lame_cluster'.") ) @@ -329,12 +329,12 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_no_file(self, l): self.assertRaises(IOError, dt.parse_yaml, path="") - l.check() + l.check_present() @log_capture() def test_bad_nice(self, l): dt.parse_yaml(path=yt.ivYMLTest11, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Running config validation..."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', @@ -349,7 +349,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_no_tool_name(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest3, job_conf_path=job_conf_path, test=True), yt.iv3dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Malformed YML; expected job name, but found a list instead!'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -358,7 +358,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_no_rule_type(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest4, job_conf_path=job_conf_path, test=True), yt.ivDict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No rule_type found for rule 1 in 'spades'."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -367,7 +367,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_no_rule_lower_bound(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest51, job_conf_path=job_conf_path, test=True), yt.ivDict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Missing bounds for rule 1 in 'spades'. Ignoring rule."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -376,7 +376,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_no_rule_upper_bound(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest52, job_conf_path=job_conf_path, test=True), yt.ivDict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Missing bounds for rule 1 in 'spades'. Ignoring rule."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -385,7 +385,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_no_rule_arg(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest53, job_conf_path=job_conf_path, test=True), yt.ivDict53) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Found a fail_message for rule 1 in 'spades', but destination is not 'fail'! Setting destination to 'fail'."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -394,7 +394,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_bad_rule_type(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest6, job_conf_path=job_conf_path, test=True), yt.ivDict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Unrecognized rule_type 'iencs' found in 'spades'. Ignoring..."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -403,7 +403,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_no_err_msg(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest91, job_conf_path=job_conf_path, test=True), yt.iv91dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No nice_value found for rule 1 in 'spades'. Setting nice_value to 0."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Missing a fail_message for rule 1 in 'spades'. Adding generic fail_message."), @@ -413,7 +413,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_no_default_dest(self, l): dt.parse_yaml(path=yt.ivYMLTest7, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'No global default destination specified in config!'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -422,7 +422,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_invalid_category(self, l): dt.parse_yaml(path=yt.ivYMLTest8, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'No global default destination specified in config!'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Unrecognized category 'ice_cream' found in config file!"), @@ -432,7 +432,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_arguments_no_err_msg(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest12, job_conf_path=job_conf_path, test=True), yt.iv12dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Missing a fail_message for rule 1 in 'spades'. Adding generic fail_message."), @@ -442,7 +442,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_arguments_no_args(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest131, job_conf_path=job_conf_path, test=True), yt.iv131dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No arguments found for rule 1 in 'spades' despite being of type arguments. Ignoring rule."), @@ -452,7 +452,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_arguments_no_arg(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest132, job_conf_path=job_conf_path, test=True), yt.iv132dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Found a fail_message for rule 1 in 'spades', but destination is not 'fail'! Setting destination to 'fail'."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -461,14 +461,14 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_bool_for_multiple_jobs(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest133, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Missing a fail_message for rule 1 in 'smalt'.") ) @log_capture() def test_return_rule_for_multiple_jobs(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest133, job_conf_path=job_conf_path, test=True), yt.iv133dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Missing a fail_message for rule 1 in 'smalt'. Adding generic fail_message."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -477,14 +477,14 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_bool_for_no_destination(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest134, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No destination specified for rule 1 in 'spades'.") ) @log_capture() def test_return_rule_for_no_destination(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest134, job_conf_path=job_conf_path, test=True), yt.iv134dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No destination specified for rule 1 in 'spades'. Ignoring..."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -493,7 +493,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_rule_for_reversed_bounds(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest135, job_conf_path=job_conf_path, test=True), yt.iv135dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "lower_bound exceeds upper_bound for rule 1 in 'spades'. Reversing bounds."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -502,14 +502,14 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_bool_for_missing_tool_fields(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest136, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Tool 'spades' does not have rules nor a default_destination!") ) @log_capture() def test_return_rule_for_missing_tool_fields(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest136, job_conf_path=job_conf_path, test=True), yt.iv136dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Tool 'spades' does not have rules nor a default_destination!"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -518,14 +518,14 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_bool_for_blank_tool(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest137, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Config section for tool 'spades' is blank!") ) @log_capture() def test_return_rule_for_blank_tool(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest137, job_conf_path=job_conf_path, test=True), yt.iv137dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Config section for tool 'spades' is blank!"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -534,7 +534,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_bool_for_malformed_users(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest138, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Entry '123' in users for rule 1 in tool 'spades' is in an invalid format!"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Supplied email 'invaliduser.email@com' for rule 1 in tool 'spades' is in an invalid format!") ) @@ -542,7 +542,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_rule_for_malformed_users(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest138, job_conf_path=job_conf_path, test=True), yt.iv138dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Entry '123' in users for rule 1 in tool 'spades' is in an invalid format! Ignoring entry."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Supplied email 'invaliduser.email@com' for rule 1 in tool 'spades' is in an invalid format! Ignoring email."), @@ -552,14 +552,14 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_bool_for_no_users(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest139, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Couldn't find a list under 'users:'!") ) @log_capture() def test_return_rule_for_no_users(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest139, job_conf_path=job_conf_path, test=True), yt.iv139dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Couldn't find a list under 'users:'! Ignoring rule."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -568,7 +568,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_bool_for_malformed_user_email(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest140, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Supplied email 'invalid.user2@com' for rule 2 in tool 'spades' is in an invalid format!"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Supplied email 'invalid.user1@com' for rule 2 in tool 'spades' is in an invalid format!"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No valid user emails were specified for rule 2 in tool 'spades'!") @@ -577,7 +577,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_rule_for_malformed_user_email(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest140, job_conf_path=job_conf_path, test=True), yt.iv140dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Supplied email 'invalid.user2@com' for rule 2 in tool 'spades' is in an invalid format! Ignoring email."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Supplied email 'invalid.user1@com' for rule 2 in tool 'spades' is in an invalid format! Ignoring email."), @@ -588,7 +588,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_bool_for_empty_users(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest141, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Entry 'None' in users for rule 2 in tool 'spades' is in an invalid format!"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Entry 'None' in users for rule 2 in tool 'spades' is in an invalid format!"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No valid user emails were specified for rule 2 in tool 'spades'!") @@ -597,7 +597,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_rule_for_empty_users(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest141, job_conf_path=job_conf_path, test=True), yt.iv141dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Entry 'None' in users for rule 2 in tool 'spades' is in an invalid format! Ignoring entry."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Entry 'None' in users for rule 2 in tool 'spades' is in an invalid format! Ignoring entry."), @@ -608,7 +608,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_bool_for_bad_num_input_datasets_bounds(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest142, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Error: lower_bound is set to Infinity, but must be lower than upper_bound!"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "lower_bound exceeds upper_bound for rule 1 in 'smalt'.") ) @@ -616,7 +616,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_rule_for_bad_num_input_datasets_bound(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest142, job_conf_path=job_conf_path, test=True), yt.iv142dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Error: lower_bound is set to Infinity, but must be lower than upper_bound! Setting lower_bound to 0!"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -625,14 +625,14 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_return_bool_for_worse_num_input_datasets_bounds(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest143, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Error: lower_bound is set to Infinity, but must be lower than upper_bound!") ) @log_capture() def test_return_rule_for_worse_num_input_datasets_bound(self, l): self.assertEquals(dt.parse_yaml(path=yt.ivYMLTest143, job_conf_path=job_conf_path, test=True), yt.iv143dict) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Error: lower_bound is set to Infinity, but must be lower than upper_bound! Setting lower_bound to 0!"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -641,7 +641,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_tool_without_low_default_destination(self, l): dt.parse_yaml(path=yt.ivYMLTest146, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No default_priority section found in config. Setting 'med' as default priority."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Invalid priority 'low' for rule 1 in 'smalt'. Ignoring..."), @@ -651,7 +651,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_tool_with_invalid_priority_destination(self, l): dt.parse_yaml(path=yt.ivYMLTest147, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No default_priority section found in config. Setting 'med' as default priority."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Invalid priority 'mine' for rule 1 in 'smalt'. Ignoring..."), @@ -661,7 +661,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_not_all_priorities_in_tool(self, l): dt.parse_yaml(path=yt.ivYMLTest149, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No default_priority section found in config. Setting 'med' as default priority."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -670,7 +670,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_rule_destination_not_in_job_conf(self, l): dt.parse_yaml(path=yt.ivYMLTest150, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No default_priority section found in config. Setting 'med' as default priority."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Destination for 'blegh', rule 1: 'fake_destination' does not exist in job configuration. Ignoring..."), @@ -680,7 +680,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_tool_default_destination_not_in_job_conf_with_no_rules(self, l): dt.parse_yaml(path=yt.ivYMLTest151, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No default_priority section found in config. Setting 'med' as default priority."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination for 'blah': 'not_true_destination' does not appear in the job configuration."), @@ -691,7 +691,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_default_destination_not_in_job_conf(self, l): dt.parse_yaml(path=yt.ivYMLTest152, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination 'no_such_dest' does not appear in the job configuration."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No default_priority section found in config. Setting 'med' as default priority."), @@ -701,7 +701,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_rule_destination_without_priority_not_in_job_conf(self, l): dt.parse_yaml(path=yt.ivYMLTest153, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No default_priority section found in config. Setting 'med' as default priority."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Destination for 'blegh', rule 1: 'fake_destination' does not exist in job configuration. Ignoring..."), @@ -711,7 +711,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_tool_default_destination_without_priority_not_in_job_conf_with_no_rules(self, l): dt.parse_yaml(path=yt.ivYMLTest154, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No default_priority section found in config. Setting 'med' as default priority."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination for 'blah': 'not_true_destination' does not appear in the job configuration."), @@ -722,7 +722,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_default_destination_without_priority_not_in_job_conf(self, l): dt.parse_yaml(path=yt.ivYMLTest155, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination 'no_such_dest' does not appear in the job configuration."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -731,7 +731,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_tool_rule_priority_does_not_exist(self, l): dt.parse_yaml(path=yt.ivYMLTest156, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No default_priority section found in config. Setting 'med' as default priority."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Invalid priority 'notAPriority' for rule 1 in 'aTool'. Ignoring..."), @@ -741,7 +741,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_tool_default_destination_priority_does_not_exist(self, l): dt.parse_yaml(path=yt.ivYMLTest157, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No default_priority section found in config. Setting 'med' as default priority."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Invalid default destination priority 'notAPriority' for 'aTool'."), @@ -751,7 +751,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_tool_default_destination_not_in_job_conf(self, l): dt.parse_yaml(path=yt.ivYMLTest158, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No default_priority section found in config. Setting 'med' as default priority."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination for 'blah': 'not_true_destination' does not appear in the job configuration."), @@ -761,7 +761,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_tool_default_destination_without_priority_not_in_job_conf(self, l): dt.parse_yaml(path=yt.ivYMLTest159, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination for 'blah': 'not_true_destination' does not appear in the job configuration."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -770,7 +770,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_empty_priority_dict(self, l): dt.parse_yaml(path=yt.ivYMLTest163, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "No global default destinations specified in config!"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -779,7 +779,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_default_dest_is_string_but_priorities_used_in_rule(self, l): dt.parse_yaml(path=yt.ivYMLTest161, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Invalid priority 'med' for rule 1 in 'blah'. Ignoring..."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -788,7 +788,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_default_dest_is_string_but_priorities_used_in_tool_default_dest(self, l): dt.parse_yaml(path=yt.ivYMLTest162, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Invalid default destination priority 'med' for 'blah'."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -797,7 +797,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_typo_in_str_default_dest(self, l): dt.parse_yaml(path=yt.ivYMLTest164, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination 'cluster-kow' does not appear in the job configuration. Did you mean 'cluster_low'?"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -806,7 +806,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_typo_in_dict_default_dest(self, l): dt.parse_yaml(path=yt.ivYMLTest165, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination 'cluster_kow' does not appear in the job configuration. Did you mean 'cluster_low'?"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -815,7 +815,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_typo_in_dict_tool_default_dest(self, l): dt.parse_yaml(path=yt.ivYMLTest166, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination for 'blah': 'cluster_defaut' does not appear in the job configuration. Did you mean 'cluster_default'?"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -824,7 +824,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_typo_in_str_tool_default_dest(self, l): dt.parse_yaml(path=yt.ivYMLTest167, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination for 'blah': 'Destination_3_med' does not appear in the job configuration. Did you mean 'Destination3_med'?"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -833,7 +833,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_typo_in_str_tool_rule_dest(self, l): dt.parse_yaml(path=yt.ivYMLTest168, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Destination for 'blah', rule 1: 'thig' does not exist in job configuration. Did you mean 'things'? Ignoring..."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -842,7 +842,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_typo_in_dict_tool_rule_dest(self, l): dt.parse_yaml(path=yt.ivYMLTest169, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Destination for 'blah', rule 1: 'even_lamerr_cluster' does not exist in job configuration. Did you mean 'even_lamer_cluster'? Ignoring..."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -851,7 +851,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_typo_in_case(self, l): dt.parse_yaml(path=yt.ivYMLTest170, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination 'destinationf' does not appear in the job configuration. Did you mean 'DestinationF'?"), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -860,7 +860,7 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_invalid_verbose_value(self, l): dt.parse_yaml(path=yt.ivYMLTest171, job_conf_path=job_conf_path, test=True) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Verbose value 'notavalue' is not True or False! Falling back to verbose..."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.') @@ -869,14 +869,14 @@ class TestDynamicToolDestination(unittest.TestCase): @log_capture() def test_invalid_default_dest_valid_tool_default_dest_bool(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest172, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination 'fake_destination' does not appear in the job configuration."), ) @log_capture() def test_valid_default_dest_invalid_tool_default_dest_bool(self, l): self.assertFalse(dt.parse_yaml(path=yt.ivYMLTest173, job_conf_path=job_conf_path, test=True, return_bool=True)) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Default destination for 'blah': 'fake_destination' does not appear in the job configuration."), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', "Tool 'blah' does not have rules nor a default_destination!"), ) @@ -900,7 +900,7 @@ class TestDynamicToolDestination(unittest.TestCase): self.assertTrue(dt.parse_yaml(yt.vYMLTest164, job_conf_path=job_conf_path, test=True, return_bool=True)) self.assertEqual(dt.parse_yaml(yt.vYMLTest164, job_conf_path=job_conf_path, test=True), yt.vdictTest164_yml) - l.check( + l.check_present( ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Finished config validation.'), ('galaxy.jobs.dynamic_tool_destination', 'DEBUG', 'Running config validation...'), From d9a2c5a970aafabe101842991a34074701f8854c Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 24 Aug 2018 20:31:59 +0200 Subject: [PATCH 12/13] Don't test tools in tool_conf.xml.sample as part of -framework This replicates what the FrameworkToolsGalaxyTestDriver does. --- run_tests.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 933ffdda4e6..b942c146da6 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -16,6 +16,7 @@ cat < Date: Sat, 25 Aug 2018 17:47:33 +0200 Subject: [PATCH 13/13] Simplify tool_conf selection in run_tests.sh Drops -with_framework_test_tools altogether. Thanks @nsoranzo. --- run_tests.sh | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index b942c146da6..6be7f598519 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -277,7 +277,6 @@ report_file="run_functional_tests.html" coverage_arg="" xunit_report_file="" structured_data_report_file="" -with_framework_test_tools_arg="" skip_client_build="--skip-client-build" if [ "$1" = "--dockerize" ]; @@ -360,7 +359,7 @@ do fi ;; -a|-api|--api) - with_framework_test_tools_arg="-with_framework_and_sample_test_tools" + GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml" test_script="pytest" report_file="./run_api_tests.html" if [ $# -gt 1 ]; then @@ -373,7 +372,7 @@ do coverage_file="api_coverage.xml" ;; -selenium|--selenium) - with_framework_test_tools_arg="-with_framework_and_sample_test_tools" + GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml" test_script="./scripts/functional_tests.py" report_file="./run_selenium_tests.html" skip_client_build="" @@ -407,10 +406,6 @@ do export GALAXY_TEST_SKIP_FLAKEY_TESTS_ON_ERROR shift ;; - -with_framework_test_tools|--with_framework_test_tools) - with_framework_test_tools_arg="-with_framework_test_tools" - shift - ;; --external_url) GALAXY_TEST_EXTERNAL=$2 shift 2 @@ -424,8 +419,8 @@ do shift 2 ;; -f|-framework|--framework) + GALAXY_TEST_TOOL_CONF="test/functional/tools/samples_tool_conf.xml" marker="-m tool" - with_framework_test_tools_arg="-with_framework_test_tools" test_script="pytest" report_file="run_framework_tests.html" coverage_file="framework_coverage.xml" @@ -433,8 +428,8 @@ do shift 1 ;; -main|-main_tools|--main_tools) + GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,config/tool_conf.xml.main" marker="-m tool" - with_framework_test_tools_arg="-with_main_tools" test_script="pytest" report_file="run_framework_tests.html" coverage_file="main_tools_coverage.xml" @@ -450,7 +445,7 @@ do shift 1 ;; -m|-migrated|--migrated) - with_framework_test_tools_arg="-migrated" + GALAXY_TEST_TOOL_CONF="config/migrated_tools_conf.xml" marker="-m tool" test_script="pytest" report_file="run_migrated_tests.html" @@ -459,7 +454,7 @@ do shift ;; -i|-installed|--installed) - with_framework_test_tools_arg="-shed" + GALAXY_TEST_TOOL_CONF="config/shed_tool_conf.xml" marker="-m tool" test_script="pytest" report_file="run_installed_tests.html" @@ -526,7 +521,7 @@ do coverage_file="unit_coverage.xml" ;; -i|-integration|--integration) - with_framework_test_tools_arg="-with_framework_and_sample_test_tools" + GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml" test_script="pytest" report_file="./run_integration_tests.html" if [ $# -gt 1 ]; then @@ -649,26 +644,12 @@ if [ -n "$structured_data_report_file" ]; then else structured_data_args="" fi -if [ "$with_framework_test_tools_arg" ]; then - if [ "$with_framework_test_tools_arg" = "-with_framework_test_tools" ]; then - GALAXY_TEST_TOOL_CONF="test/functional/tools/samples_tool_conf.xml" - elif [ "$with_framework_test_tools_arg" = "-with_framework_and_sample_test_tools" ]; then - GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml" - elif [ "$with_framework_test_tools_arg" = "-migrated" ]; then - GALAXY_TEST_TOOL_CONF="config/migrated_tools_conf.xml" - elif [ "$with_framework_test_tools_arg" = "-shed" ]; then - GALAXY_TEST_TOOL_CONF="config/shed_tool_conf.xml" - elif [ "$with_framework_test_tools_arg" = "-with_main_tools" ]; then - GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,config/tool_conf.xml.main" - fi - echo $GALAXY_TEST_TOOL_CONF - export GALAXY_TEST_TOOL_CONF -fi +export GALAXY_TEST_TOOL_CONF if [ "$test_script" = 'pytest' ]; then if [ "$coverage_arg" = "--with_coverage" ]; then coverage_arg="--cov-report term --cov-report xml:cov-unit.xml --cov=lib" fi - GALAXY_TEST_TOOL_CONF=$GALAXY_TEST_TOOL_CONF "$test_script" -v --html "$report_file" $coverage_arg $xunit_args $extra_args "$@" + "$test_script" -v --html "$report_file" $coverage_arg $xunit_args $extra_args "$@" else python $test_script $coverage_arg -v --with-nosehtml --html-report-file $report_file $xunit_args $structured_data_args $extra_args "$@" fi