Look for the __test__ attribute, which is applied by the @nose.tools.istest decorator.
(self, obj: object)
| 355 | return self._matches_prefix_or_glob_option("python_functions", name) |
| 356 | |
| 357 | def isnosetest(self, obj: object) -> bool: |
| 358 | """Look for the __test__ attribute, which is applied by the |
| 359 | @nose.tools.istest decorator. |
| 360 | """ |
| 361 | # We explicitly check for "is True" here to not mistakenly treat |
| 362 | # classes with a custom __getattr__ returning something truthy (like a |
| 363 | # function) as test classes. |
| 364 | return safe_getattr(obj, "__test__", False) is True |
| 365 | |
| 366 | def classnamefilter(self, name: str) -> bool: |
| 367 | return self._matches_prefix_or_glob_option("python_classes", name) |
no test coverage detected