File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,13 @@ async def asend(self, agen):
48
48
"""
49
49
50
50
51
- class Value (ValueBase ):
51
+ class Value (Outcome , ValueBase ):
52
52
async def asend (self , agen ):
53
53
self ._set_unwrapped ()
54
54
return await agen .asend (self .value )
55
55
56
56
57
- class Error (ErrorBase ):
57
+ class Error (Outcome , ErrorBase ):
58
58
async def asend (self , agen ):
59
59
self ._set_unwrapped ()
60
60
return await agen .athrow (self .error )
Original file line number Diff line number Diff line change @@ -103,3 +103,8 @@ def raise_ValueError(x):
103
103
assert type (e ) == Error
104
104
assert type (e .error ) is ValueError
105
105
assert e .error .args == ("two" ,)
106
+
107
+
108
+ def test_inheritance ():
109
+ assert issubclass (Value , outcome .Outcome )
110
+ assert issubclass (Error , outcome .Outcome )
You can’t perform that action at this time.
0 commit comments