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):
123
123
"""
124
124
Mark as inline callbacks test for pytest-twisted processing and apply
125
125
@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.
126
131
"""
127
132
decorated = decorator_apply (defer .inlineCallbacks , f )
128
133
_set_mark (o = decorated , mark = 'inline_callbacks_test' )
@@ -131,7 +136,12 @@ def inlineCallbacks(f):
131
136
132
137
133
138
def 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
+ """
135
145
_set_mark (o = f , mark = 'async_test' )
136
146
137
147
return f
You can’t perform that action at this time.
0 commit comments