File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,6 +208,35 @@ def test_with_tag_returns_scheduled_task():
208208 assert tagged ["tag" ] == "gpu"
209209
210210
211+ def test_untagged_activity_returns_none_tag ():
212+ """Schedule an untagged activity (no .with_tag()), verify ctx.tag() is None."""
213+ provider = SqliteProvider .in_memory ()
214+ client = Client (provider )
215+ runtime = Runtime (
216+ provider ,
217+ PyRuntimeOptions (dispatcher_poll_interval_ms = 50 ),
218+ )
219+
220+ @runtime .register_activity ("Plain" )
221+ def plain (ctx , input ):
222+ return {"tag" : ctx .tag ()}
223+
224+ @runtime .register_orchestration ("NoTagOrch" )
225+ def no_tag_orch (ctx , input ):
226+ result = yield ctx .schedule_activity ("Plain" , input )
227+ return result
228+
229+ runtime .start ()
230+ try :
231+ instance_id = uid ("untagged-none" )
232+ client .start_orchestration (instance_id , "NoTagOrch" , "x" )
233+ result = client .wait_for_orchestration (instance_id , 10_000 )
234+ assert result .status == "Completed"
235+ assert result .output ["tag" ] is None
236+ finally :
237+ runtime .shutdown (100 )
238+
239+
211240# ─── PostgreSQL Tests ──────────────────────────────────────────────
212241
213242
You can’t perform that action at this time.
0 commit comments