diff --git a/python/grass/script/task.py b/python/grass/script/task.py index 325b5640edc..eedf34738e7 100644 --- a/python/grass/script/task.py +++ b/python/grass/script/task.py @@ -148,9 +148,6 @@ def get_param(self, value, element="name", raiseError=True): if isinstance(val, (list, tuple)): if value in val: return p - elif isinstance(val, (bytes, str)): - if p[element][: len(value)] == value: - return p else: if p[element] == value: return p diff --git a/python/grass/script/tests/test_script_task.py b/python/grass/script/tests/test_script_task.py new file mode 100644 index 00000000000..6799885761e --- /dev/null +++ b/python/grass/script/tests/test_script_task.py @@ -0,0 +1,11 @@ +from grass.script.task import grassTask as gtask + + +def test_mapcalc_simple_e_name(): + gt = gtask("r.mapcalc.simple") + assert gt.get_param("e")["name"] == "e" + + +def test_mapcalc_simple_expession_name(): + gt = gtask("r.mapcalc.simple") + assert gt.get_param("expression")["name"] == "expression"