Look for the __test__ attribute, which is applied by the @nose.tools.istest decorator.
(self, obj: object)
| 371 | return self._matches_prefix_or_glob_option("python_functions", name) |
| 372 | |
| 373 | def isnosetest(self, obj: object) -> bool: |
| 374 | """Look for the __test__ attribute, which is applied by the |
| 375 | @nose.tools.istest decorator. |
| 376 | """ |
| 377 | # We explicitly check for "is True" here to not mistakenly treat |
| 378 | # classes with a custom __getattr__ returning something truthy (like a |
| 379 | # function) as test classes. |
| 380 | return safe_getattr(obj, "__test__", False) is True |
| 381 | |
| 382 | def classnamefilter(self, name: str) -> bool: |
| 383 | return self._matches_prefix_or_glob_option("python_classes", name) |
no test coverage detected