Skip to content

Commit 6b16607

Browse files
Merge pull request #21 from InformaticsMatters/options-processing
Fixed failing decoder test
2 parents 22e9a1a + 0489817 commit 6b16607

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

tests/test_decoder.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ def test_get_required_variable_names_for_simnple_python_molprops_with_options():
235235
assert "rdkitPropertyValue" in rqd_variables
236236

237237

238-
@pytest.mark.skip(reason="The decoder does not currently handle options processing")
239238
def test_set_variables_from_options_for_step_for_simnple_python_molprops_with_options():
240239
# Arrange
241240
variables = {
@@ -244,15 +243,14 @@ def test_set_variables_from_options_for_step_for_simnple_python_molprops_with_op
244243
}
245244

246245
# Act
247-
new_variables, error = decoder.set_variables_from_options_for_step(
246+
new_variables = decoder.set_variables_from_options_for_step(
248247
_SIMPLE_PYTHON_MOLPROPS_WITH_OPTIONS_WORKFLOW,
249248
variables,
250249
"step1",
251250
)
252251

253252
# Assert
254-
assert error is None
255-
assert len(new_variables) == 4
253+
assert len(new_variables) == 2
256254
assert "name" in new_variables
257255
assert "value" in new_variables
258256
assert new_variables["name"] == "propertyName"

tests/test_workflow_engine_examples.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ def test_workflow_engine_simple_python_molprops(basic_engine):
313313
assert project_file_exists(output_file_2)
314314

315315

316-
# @pytest.mark.skip(reason="The engine does not currently create the required variables")
317316
def test_workflow_engine_simple_python_molprops_with_options(basic_engine):
318317
# Arrange
319318
da, md = basic_engine

workflow/decoder.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,8 @@ def set_variables_from_options_for_step(
111111
assert isinstance(definition, dict)
112112
assert step_name
113113

114-
print("workflow", definition)
115-
print("workflow_variables", variables)
116-
117114
result = {}
118115
options = definition.get("variables", {}).get("options", [])
119-
print("options", options)
120-
print("variables", variables)
121116

122117
for opt in options:
123118
for step_alias in opt["as"]:

0 commit comments

Comments
 (0)