diff --git a/pyanalyze/test_asynq.py b/pyanalyze/test_asynq.py index 7ba40632..891a1b26 100644 --- a/pyanalyze/test_asynq.py +++ b/pyanalyze/test_asynq.py @@ -110,8 +110,8 @@ def test_constfuture(self): from asynq import ConstFuture, asynq @asynq() - def bad_async_fn(): - return ConstFuture(3) # E: task_needs_yield + def bad_async_fn(): # E: task_needs_yield + return ConstFuture(3) @assert_passes() def test_async(self): @@ -122,8 +122,8 @@ def async_fn(): pass @asynq() - def bad_async_fn(): - return async_fn.asynq() # E: task_needs_yield + def bad_async_fn(): # E: task_needs_yield + return async_fn.asynq() @assert_passes() def test_not_yielded(self): @@ -132,8 +132,8 @@ def test_not_yielded(self): from pyanalyze.tests import async_fn @asynq() - def capybara(oid): - return async_fn.asynq(oid) # E: task_needs_yield + def capybara(oid): # E: task_needs_yield + return async_fn.asynq(oid) def test_not_yielded_replacement(self): self.assert_is_changed(