Skip to content

Commit bc2db12

Browse files
committed
fix(tests): string concatenation and formatting
- Fixed incorrect string concatenation in test_commands.py. - Updated old-style string formatting to f-strings in workflow.py. - Adjusted literal string formatting in test_dataflow.py for consistency. Signed-off-by: Yves Bastide <yves@botify.com>
1 parent 2df4597 commit bc2db12

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/integration/test_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def test_simpleflow_idempotent(self):
110110
if (
111111
e["eventType"] == "ActivityTaskScheduled"
112112
and e["activityTaskScheduledEventAttributes"]["activityType"]["name"]
113-
== "tests.integration.workflow" ".get_uuid"
113+
== "tests.integration.workflow.get_uuid"
114114
)
115115
]
116116
expect(activities).should.have.length_of(2)

tests/integration/workflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ def get_uuid(unused=None):
3434

3535
@activity.with_attributes(task_list="quickstart", version="example")
3636
def increment(x):
37-
print("increment: %d" % x)
37+
print(f"increment: {x:d}")
3838
return x + 1
3939

4040

4141
@activity.with_attributes(task_list="quickstart", version="example")
4242
def double(y):
43-
print("double: %d" % y)
43+
print(f"double: {y:d}")
4444
return y * 2
4545

4646

tests/test_simpleflow/test_dataflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ def test_workflow_activity_raises_on_failure(mock_decref_workflow):
11761176

11771177
workflow_failed = simpleflow.swf.mapper.models.decision.WorkflowExecutionDecision()
11781178
workflow_failed.fail(
1179-
reason="Workflow execution error in " "activity-tests.data.activities.raise_on_failure: " '"error"',
1179+
reason='Workflow execution error in activity-tests.data.activities.raise_on_failure: "error"',
11801180
details=builder.DEFAULT_DETAILS,
11811181
)
11821182

0 commit comments

Comments
 (0)