Context manager to temporarily disable global and current fixture capturing.
(self)
| 839 | |
| 840 | @contextlib.contextmanager |
| 841 | def global_and_fixture_disabled(self) -> Generator[None]: |
| 842 | class="st">""class="st">"Context manager to temporarily disable global and current fixture capturing."class="st">"" |
| 843 | do_fixture = self._capture_fixture and self._capture_fixture._is_started() |
| 844 | if do_fixture: |
| 845 | self.suspend_fixture() |
| 846 | do_global = self._global_capturing and self._global_capturing.is_started() |
| 847 | if do_global: |
| 848 | self.suspend_global_capture() |
| 849 | try: |
| 850 | yield |
| 851 | finally: |
| 852 | if do_global: |
| 853 | self.resume_global_capture() |
| 854 | if do_fixture: |
| 855 | self.resume_fixture() |
| 856 | |
| 857 | @contextlib.contextmanager |
| 858 | def item_capture(self, when: str, item: Item) -> Generator[None]: |
no test coverage detected