@@ -171,9 +171,11 @@ async def test_replayer_workflow_nondeterministic(client: Client) -> None:
171
171
172
172
173
173
async def test_replayer_workflow_nondeterministic_json () -> None :
174
- with Path (__file__ ).with_name ("test_replayer_nondeterministic_history.json" ).open (
175
- "r"
176
- ) as f :
174
+ with (
175
+ Path (__file__ )
176
+ .with_name ("test_replayer_nondeterministic_history.json" )
177
+ .open ("r" ) as f
178
+ ):
177
179
history_json = f .read ()
178
180
with pytest .raises (workflow .NondeterminismError ):
179
181
await Replayer (workflows = [SayHelloWorkflow ]).replay_workflow (
@@ -184,9 +186,11 @@ async def test_replayer_workflow_nondeterministic_json() -> None:
184
186
async def test_replayer_multiple_histories_fail_fast () -> None :
185
187
with Path (__file__ ).with_name ("test_replayer_complete_history.json" ).open ("r" ) as f :
186
188
history_json = f .read ()
187
- with Path (__file__ ).with_name ("test_replayer_nondeterministic_history.json" ).open (
188
- "r"
189
- ) as f :
189
+ with (
190
+ Path (__file__ )
191
+ .with_name ("test_replayer_nondeterministic_history.json" )
192
+ .open ("r" ) as f
193
+ ):
190
194
history_json_bad = f .read ()
191
195
192
196
callcount = 0
@@ -210,9 +214,11 @@ async def histories():
210
214
async def test_replayer_multiple_histories_fail_slow () -> None :
211
215
with Path (__file__ ).with_name ("test_replayer_complete_history.json" ).open ("r" ) as f :
212
216
history_json = f .read ()
213
- with Path (__file__ ).with_name ("test_replayer_nondeterministic_history.json" ).open (
214
- "r"
215
- ) as f :
217
+ with (
218
+ Path (__file__ )
219
+ .with_name ("test_replayer_nondeterministic_history.json" )
220
+ .open ("r" ) as f
221
+ ):
216
222
history_json_bad = f .read ()
217
223
218
224
callcount = 0
@@ -389,9 +395,11 @@ async def test_replayer_command_reordering_backward_compatibility() -> None:
389
395
to [UpdateAccepted, CompleteWorkflowExecution], and events 5 and 6 can be applied to the
390
396
corresponding state machines.
391
397
"""
392
- with Path (__file__ ).with_name (
393
- "test_replayer_command_reordering_backward_compatibility.json"
394
- ).open () as f :
398
+ with (
399
+ Path (__file__ )
400
+ .with_name ("test_replayer_command_reordering_backward_compatibility.json" )
401
+ .open () as f
402
+ ):
395
403
history = f .read ()
396
404
await Replayer (workflows = [UpdateCompletionAfterWorkflowReturn ]).replay_workflow (
397
405
WorkflowHistory .from_json ("fake" , history )
@@ -475,9 +483,11 @@ async def test_replayer_async_ordering() -> None:
475
483
476
484
477
485
async def test_replayer_alternate_async_ordering () -> None :
478
- with Path (__file__ ).with_name (
479
- "test_replayer_event_tracing_alternate.json"
480
- ).open () as f :
486
+ with (
487
+ Path (__file__ )
488
+ .with_name ("test_replayer_event_tracing_alternate.json" )
489
+ .open () as f
490
+ ):
481
491
history = f .read ()
482
492
await Replayer (
483
493
workflows = [ActivityAndSignalsWhileWorkflowDown ],
0 commit comments