File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,11 @@ def inlineCallbacks(f):
123123 """
124124 Mark as inline callbacks test for pytest-twisted processing and apply
125125 @inlineCallbacks.
126+
127+ Unlike @ensureDeferred, @inlineCallbacks can be applied here because it
128+ does not call nor schedule the test function. Further, @inlineCallbacks
129+ must be applied here otherwise pytest identifies the test as a 'yield test'
130+ for which they dropped support in 4.0 and now they skip.
126131 """
127132 decorated = decorator_apply (defer .inlineCallbacks , f )
128133 _set_mark (o = decorated , mark = 'inline_callbacks_test' )
@@ -131,7 +136,12 @@ def inlineCallbacks(f):
131136
132137
133138def ensureDeferred (f ):
134- """Mark as async test for pytest-twisted processing."""
139+ """
140+ Mark as async test for pytest-twisted processing.
141+
142+ Unlike @inlineCallbacks, @ensureDeferred must not be applied here since it
143+ would call and schedule the test function.
144+ """
135145 _set_mark (o = f , mark = 'async_test' )
136146
137147 return f
You can’t perform that action at this time.
0 commit comments