File tree 3 files changed +12
-1
lines changed
3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ def isgenerator(obj):
25
25
return isinstance (obj , type ((_g )()))
26
26
27
27
28
+ # In MicroPython there's currently no way to distinguish between generators and coroutines.
29
+ iscoroutinefunction = isgeneratorfunction
30
+ iscoroutine = isgenerator
31
+
32
+
28
33
class _Class :
29
34
def meth ():
30
35
pass
Original file line number Diff line number Diff line change 1
- metadata (version = "0.1.2 " )
1
+ metadata (version = "0.1.3 " )
2
2
3
3
module ("inspect.py" )
Original file line number Diff line number Diff line change @@ -44,6 +44,12 @@ def test_isgeneratorfunction(self):
44
44
def test_isgenerator (self ):
45
45
self ._test_is_helper (inspect .isgenerator , entities [2 ])
46
46
47
+ def test_iscoroutinefunction (self ):
48
+ self ._test_is_helper (inspect .iscoroutinefunction , entities [1 ])
49
+
50
+ def test_iscoroutine (self ):
51
+ self ._test_is_helper (inspect .iscoroutine , entities [2 ])
52
+
47
53
def test_ismethod (self ):
48
54
self ._test_is_helper (inspect .ismethod , entities [5 ])
49
55
You can’t perform that action at this time.
0 commit comments