| 54 | |
| 55 | @staticmethod |
| 56 | def _iter_methods(bases, ns): |
| 57 | for base in bases: |
| 58 | for methname in dir(base): |
| 59 | if not methname.startswith('test_'): |
| 60 | continue |
| 61 | |
| 62 | meth = getattr(base, methname) |
| 63 | if not inspect.iscoroutinefunction(meth): |
| 64 | continue |
| 65 | |
| 66 | yield methname, meth |
| 67 | |
| 68 | for methname, meth in ns.items(): |
| 69 | if not methname.startswith('test_'): |
| 70 | continue |
| 71 | |
| 72 | if not inspect.iscoroutinefunction(meth): |
| 73 | continue |
| 74 | |
| 75 | yield methname, meth |
| 76 | |
| 77 | def __new__(mcls, name, bases, ns): |
| 78 | for methname, meth in mcls._iter_methods(bases, ns): |