Nicola Soranzo
5ff960e9ae
Fix comparing a boolean `InputValueWrapper` to "True"/"False" strings
...
Fix the following framework test failures:
test/functional/test_toolbox_pytest.py::test_tool[output_action_change_format_test_1]
E galaxy.tool_util.verify.interactor.JobOutputsError: Dataset metadata verification for [metadata_dbkey] failed, expected [hg19] but found [?]. Dataset API value was [{'id': '8ac6d96e308f61e5', 'name': 'output_action_change_format on data 1', 'history_id': '2cf235fc3a3387c3', 'hid': 2, 'history_content_type': 'dataset', 'deleted': False, 'visible': True, 'type_id': 'dataset-8ac6d96e308f61e5', 'type': 'file', 'create_time': '2022-09-01T18:07:56.177858', 'update_time': '2022-09-01T18:08:01.856249', 'url': '/api/histories/2cf235fc3a3387c3/contents/8ac6d96e308f61e5', 'tags': [], 'dataset_id': '8ac6d96e308f61e5', 'state': 'ok', 'extension': 'data', 'purged': False, 'misc_info': '', 'data_type': 'galaxy.datatypes.data.Data', 'creating_job': '7fbe67cfae825002', 'hda_ldda': 'hda', 'peek': None, 'created_from_basename': 'out1', 'display_types': [], 'download_url': '/api/histories/2cf235fc3a3387c3/contents/8ac6d96e308f61e5/display', 'display_apps': [], 'meta_files': [], 'file_ext': 'data', 'sources': [], 'copied_from_ldda_id': None, 'uuid': '6decb7d7-1e5a-4036-9895-6cea83a85737', 'file_name': '/tmp/tmpdsxagstf/tmp84ke9cq4/tmpv3mcqttw/database/objects/6/d/e/dataset_6decb7d7-1e5a-4036-9895-6cea83a85737.dat', 'api_type': 'file', 'misc_blurb': 'data', 'hashes': [], 'accessible': True, 'file_size': 4, 'model_class': 'HistoryDatasetAssociation', 'metadata_dbkey': '?', 'validated_state_message': None, 'resubmitted': False, 'permissions': {'manage': ['adb5f5c93f827949'], 'access': []}, 'annotation': None, 'validated_state': 'unknown', 'rerunnable': True, 'genome_build': '?'}].
test/functional/test_toolbox_pytest.py::test_tool[output_action_change_format_test_2]
E galaxy.tool_util.verify.interactor.JobOutputsError: Dataset metadata verification for [metadata_dbkey] failed, expected [hg38] but found [?]. Dataset API value was [{'id': 'b316627aece188a7', 'name': 'output_action_change_format on data 1', 'history_id': 'a53aa9d4dc32b5ed', 'hid': 2, 'history_content_type': 'dataset', 'deleted': False, 'visible': True, 'type_id': 'dataset-b316627aece188a7', 'type': 'file', 'create_time': '2022-09-01T18:08:12.870025', 'update_time': '2022-09-01T18:08:18.490136', 'url': '/api/histories/a53aa9d4dc32b5ed/contents/b316627aece188a7', 'tags': [], 'dataset_id': 'b316627aece188a7', 'state': 'ok', 'extension': 'txt', 'purged': False, 'misc_info': '', 'data_type': 'galaxy.datatypes.data.Text', 'creating_job': '3607dcbef30930ec', 'hda_ldda': 'hda', 'peek': '<table cellspacing="0" cellpadding="3"><tr><td>1\t2</td></tr></table>', 'created_from_basename': 'out1', 'display_types': [], 'download_url': '/api/histories/a53aa9d4dc32b5ed/contents/b316627aece188a7/display', 'display_apps': [], 'meta_files': [], 'file_ext': 'txt', 'sources': [], 'copied_from_ldda_id': None, 'uuid': '4a58c935-6fea-4b55-b659-871e652021de', 'file_name': '/tmp/tmpdsxagstf/tmp84ke9cq4/tmpv3mcqttw/database/objects/4/a/5/dataset_4a58c935-6fea-4b55-b659-871e652021de.dat', 'api_type': 'file', 'misc_blurb': '1 line', 'hashes': [], 'accessible': True, 'file_size': 4, 'model_class': 'HistoryDatasetAssociation', 'metadata_dbkey': '?', 'validated_state_message': None, 'resubmitted': False, 'permissions': {'manage': ['adb5f5c93f827949'], 'access': []}, 'annotation': None, 'validated_state': 'unknown', 'metadata_data_lines': 1, 'rerunnable': True, 'genome_build': '?'}].
that started to appear after commit
94c75a083c was merged forward.
In particular, for the above tests the `ref` variable at
https://github.com/galaxyproject/galaxy/commit/94c75a083c25612b5f9e4aac6fc53d0ac2c77253#diff-0251b89ba313ad7ec78f79bfc21e416597cefd52447314029a728af5d775dbc6R85
is now a boolean `InputValueWrapper` instance, which could not be
meaningfully compared to `value` if it was a "True" or "False" string
because `ref` would be converted to the `truevalue` or `falsevalue` of the
parameter when casted to `str`.
2022-09-02 18:26:01 +01:00