diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index c834c3739ffa..9b5dc2a0d72f 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -175,7 +175,7 @@ class ToolParameter(UsesDictVisibleKeys): >>> trans = Bunch(app=None) >>> p = ToolParameter(None, XML('')) >>> assert p.name == 'parameter_name' - >>> assert sorted(p.to_dict(trans).items()) == [('argument', '--parameter-name'), ('help', ''), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'ToolParameter'), ('name', 'parameter_name'), ('optional', False), ('refresh_on_change', False), ('type', 'text'), ('value', None)] + >>> assert sorted(p.to_dict(trans).items()) == [('argument', '--parameter-name'), ('help', ''), ('help_format', 'html'), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'ToolParameter'), ('name', 'parameter_name'), ('optional', False), ('refresh_on_change', False), ('type', 'text'), ('value', None)] """ name: str @@ -389,7 +389,7 @@ class TextToolParameter(SimpleTextToolParameter): >>> print(p.name) _name >>> sorted(p.to_dict(trans).items()) - [('area', False), ('argument', None), ('datalist', []), ('help', ''), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'TextToolParameter'), ('name', '_name'), ('optional', True), ('refresh_on_change', False), ('type', 'text'), ('value', 'default')] + [('area', False), ('argument', None), ('datalist', []), ('help', ''), ('help_format', 'html'), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'TextToolParameter'), ('name', '_name'), ('optional', True), ('refresh_on_change', False), ('type', 'text'), ('value', 'default')] """ def __init__(self, tool, input_source): @@ -446,9 +446,9 @@ class IntegerToolParameter(TextToolParameter): >>> p = IntegerToolParameter(None, XML('')) >>> print(p.name) _name - >>> assert sorted(p.to_dict(trans).items()) == [('area', False), ('argument', None), ('datalist', []), ('help', ''), ('hidden', False), ('is_dynamic', False), ('label', ''), ('max', None), ('min', None), ('model_class', 'IntegerToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'integer'), ('value', u'10')] + >>> assert sorted(p.to_dict(trans).items()) == [('area', False), ('argument', None), ('datalist', []), ('help', ''), ('help_format', 'html'), ('hidden', False), ('is_dynamic', False), ('label', ''), ('max', None), ('min', None), ('model_class', 'IntegerToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'integer'), ('value', u'10')] >>> assert type(p.from_json("10", trans)) == int - >>> with assert_throws_param_value_error("parameter '_name': an integer or workflow parameter is required"): + >>> with assert_throws_param_value_error("Parameter '_name': an integer or workflow parameter is required"): ... p.from_json("_string", trans) """ @@ -519,9 +519,9 @@ class FloatToolParameter(TextToolParameter): >>> p = FloatToolParameter(None, XML('')) >>> print(p.name) _name - >>> assert sorted(p.to_dict(trans).items()) == [('area', False), ('argument', None), ('datalist', []), ('help', ''), ('hidden', False), ('is_dynamic', False), ('label', ''), ('max', None), ('min', None), ('model_class', 'FloatToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'float'), ('value', u'3.141592')] + >>> assert sorted(p.to_dict(trans).items()) == [('area', False), ('argument', None), ('datalist', []), ('help', ''), ('help_format', 'html'), ('hidden', False), ('is_dynamic', False), ('label', ''), ('max', None), ('min', None), ('model_class', 'FloatToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'float'), ('value', u'3.141592')] >>> assert type(p.from_json("36.1", trans)) == float - >>> with assert_throws_param_value_error("parameter '_name': an integer or workflow parameter is required"): + >>> with assert_throws_param_value_error("Parameter '_name': an integer or workflow parameter is required"): ... p.from_json("_string", trans) """ @@ -594,7 +594,7 @@ class BooleanToolParameter(ToolParameter): >>> p = BooleanToolParameter(None, XML('')) >>> print(p.name) _name - >>> assert sorted(p.to_dict(trans).items()) == [('argument', None), ('falsevalue', '_falsevalue'), ('help', ''), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'BooleanToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('truevalue', '_truevalue'), ('type', 'boolean'), ('value', True)] + >>> assert sorted(p.to_dict(trans).items()) == [('argument', None), ('falsevalue', '_falsevalue'), ('help', ''), ('help_format', 'html'), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'BooleanToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('truevalue', '_truevalue'), ('type', 'boolean'), ('value', True)] >>> print(p.from_json('true', trans)) True >>> print(p.to_param_dict_string(True)) @@ -668,7 +668,7 @@ class FileToolParameter(ToolParameter): >>> print(p.name) _name >>> sorted(p.to_dict(trans).items()) - [('argument', None), ('help', ''), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'FileToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'file'), ('value', None)] + [('argument', None), ('help', ''), ('help_format', 'html'), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'FileToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'file'), ('value', None)] """ def __init__(self, tool, input_source): @@ -742,7 +742,7 @@ class FTPFileToolParameter(ToolParameter): >>> print(p.name) _name >>> sorted(p.to_dict(trans).items()) - [('argument', None), ('help', ''), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'FTPFileToolParameter'), ('multiple', True), ('name', '_name'), ('optional', True), ('refresh_on_change', False), ('type', 'ftpfile'), ('value', None)] + [('argument', None), ('help', ''), ('help_format', 'html'), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'FTPFileToolParameter'), ('multiple', True), ('name', '_name'), ('optional', True), ('refresh_on_change', False), ('type', 'ftpfile'), ('value', None)] """ def __init__(self, tool, input_source): @@ -815,7 +815,7 @@ class HiddenToolParameter(ToolParameter): >>> p = HiddenToolParameter(None, XML('')) >>> print(p.name) _name - >>> assert sorted(p.to_dict(trans).items()) == [('argument', None), ('help', ''), ('hidden', True), ('is_dynamic', False), ('label', ''), ('model_class', 'HiddenToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'hidden'), ('value', u'_value')] + >>> assert sorted(p.to_dict(trans).items()) == [('argument', None), ('help', ''), ('help_format', 'html'), ('hidden', True), ('is_dynamic', False), ('label', ''), ('model_class', 'HiddenToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'hidden'), ('value', u'_value')] """ def __init__(self, tool, input_source): @@ -842,14 +842,14 @@ class ColorToolParameter(ToolParameter): _name >>> print(p.to_param_dict_string("#ffffff")) #ffffff - >>> assert sorted(p.to_dict(trans).items()) == [('argument', None), ('help', ''), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'ColorToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'color'), ('value', u'#ffffff')] + >>> assert sorted(p.to_dict(trans).items()) == [('argument', None), ('help', ''), ('help_format', 'html'), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'ColorToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'color'), ('value', u'#ffffff')] >>> p = ColorToolParameter(None, XML('')) >>> print(p.get_initial_value(trans, {})) #000000 >>> p = ColorToolParameter(None, XML('')) >>> print(p.to_param_dict_string("#ffffff")) (255, 255, 255) - >>> with assert_throws_param_value_error("parameter '_name': Failed to convert 'None' to RGB."): + >>> with assert_throws_param_value_error("Parameter '_name': Failed to convert 'None' to RGB."): ... p.to_param_dict_string(None) """ @@ -883,7 +883,7 @@ class BaseURLToolParameter(HiddenToolParameter): >>> p = BaseURLToolParameter(None, XML('')) >>> print(p.name) _name - >>> assert sorted(p.to_dict(trans).items()) == [('argument', None), ('help', ''), ('hidden', True), ('is_dynamic', False), ('label', ''), ('model_class', 'BaseURLToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'base_url'), ('value', u'_value')] + >>> assert sorted(p.to_dict(trans).items()) == [('argument', None), ('help', ''), ('help_format', 'html'), ('hidden', True), ('is_dynamic', False), ('label', ''), ('model_class', 'BaseURLToolParameter'), ('name', '_name'), ('optional', False), ('refresh_on_change', False), ('type', 'base_url'), ('value', u'_value')] """ def __init__(self, tool, input_source): @@ -933,7 +933,7 @@ class SelectToolParameter(ToolParameter): >>> print(p.name) _name >>> sorted(p.to_dict(trans).items()) - [('argument', None), ('display', None), ('help', ''), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'SelectToolParameter'), ('multiple', False), ('name', '_name'), ('optional', False), ('options', [('x_label', 'x', False), ('y_label', 'y', True), ('z_label', 'z', False)]), ('refresh_on_change', False), ('textable', False), ('type', 'select'), ('value', 'y')] + [('argument', None), ('display', None), ('help', ''), ('help_format', 'html'), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'SelectToolParameter'), ('multiple', False), ('name', '_name'), ('optional', False), ('options', [('x_label', 'x', False), ('y_label', 'y', True), ('z_label', 'z', False)]), ('refresh_on_change', False), ('textable', False), ('type', 'select'), ('value', 'y')] >>> p = SelectToolParameter(None, XML( ... ''' ... @@ -945,7 +945,7 @@ class SelectToolParameter(ToolParameter): >>> print(p.name) _name >>> sorted(p.to_dict(trans).items()) - [('argument', None), ('display', None), ('help', ''), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'SelectToolParameter'), ('multiple', True), ('name', '_name'), ('optional', True), ('options', [('x_label', 'x', False), ('y_label', 'y', True), ('z_label', 'z', True)]), ('refresh_on_change', False), ('textable', False), ('type', 'select'), ('value', ['y', 'z'])] + [('argument', None), ('display', None), ('help', ''), ('help_format', 'html'), ('hidden', False), ('is_dynamic', False), ('label', ''), ('model_class', 'SelectToolParameter'), ('multiple', True), ('name', '_name'), ('optional', True), ('options', [('x_label', 'x', False), ('y_label', 'y', True), ('z_label', 'z', True)]), ('refresh_on_change', False), ('textable', False), ('type', 'select'), ('value', ['y', 'z'])] >>> print(p.to_param_dict_string(["y", "z"])) y,z """ diff --git a/lib/galaxy_test/api/test_jobs.py b/lib/galaxy_test/api/test_jobs.py index c904e808f70f..9c16fc18eb72 100644 --- a/lib/galaxy_test/api/test_jobs.py +++ b/lib/galaxy_test/api/test_jobs.py @@ -634,7 +634,7 @@ def test_submission_on_collection_with_deleted_element(self, history_id): assert response.status_code == 400 assert ( response.json()["err_msg"] - == "parameter 'collection': the previously selected dataset collection has elements that are deleted." + == "Parameter 'collection': the previously selected dataset collection has elements that are deleted." ) @pytest.mark.require_new_history diff --git a/lib/galaxy_test/api/test_tools.py b/lib/galaxy_test/api/test_tools.py index 6be4ea256490..41d982d246c9 100644 --- a/lib/galaxy_test/api/test_tools.py +++ b/lib/galaxy_test/api/test_tools.py @@ -934,7 +934,7 @@ def test_data_column_defaults(self): with self.dataset_populator.test_history(require_new=False) as history_id: response = self._run("gx_data_column_multiple", history_id, inputs, assert_ok=False).json() assert "err_msg" in response, str(response) - assert "parameter 'parameter': an invalid option" in response["err_msg"] + assert "Parameter 'parameter': an invalid option" in response["err_msg"] with self.dataset_populator.test_history(require_new=True) as history_id: response = self._run("gx_data_column_optional", history_id, inputs, assert_ok=True) @@ -2217,7 +2217,7 @@ def test_implicit_conversion_and_reduce_invalid_param(self): self._run_implicit_collection_and_reduce(history_id=history_id, param="X") details = self.dataset_populator.get_history_dataset_details(history_id=history_id, hid=3, assert_ok=False) assert details["state"] == "error" - assert "parameter 'col': an invalid option" in details["misc_info"] + assert "Parameter 'col': an invalid option" in details["misc_info"] def _run_implicit_collection_and_reduce(self, history_id, param): fasta_path = self.test_data_resolver.get_filename("1.fasta")