Return the attribute from the given object to be used as a setup/teardown xunit-style function, but only if not marked as a fixture to avoid calling it twice.
(obj: object, names: Iterable[str])
| 733 | |
| 734 | |
| 735 | def _get_first_non_fixture_func(obj: object, names: Iterable[str]) -> object | None: |
| 736 | """Return the attribute from the given object to be used as a setup/teardown |
| 737 | xunit-style function, but only if not marked as a fixture to avoid calling it twice. |
| 738 | """ |
| 739 | for name in names: |
| 740 | meth: object | None = getattr(obj, name, None) |
| 741 | if meth is not None and fixtures.getfixturemarker(meth) is None: |
| 742 | return meth |
| 743 | return None |
| 744 | |
| 745 | |
| 746 | class Class(PyCollector): |
no outgoing calls
no test coverage detected
searching dependent graphs…