Stop an active patch.
(self)
| 1670 | |
| 1671 | |
| 1672 | def stop(self): |
| 1673 | """Stop an active patch.""" |
| 1674 | try: |
| 1675 | self._active_patches.remove(self) |
| 1676 | except ValueError: |
| 1677 | # If the patch hasn't been started this will fail |
| 1678 | return None |
| 1679 | |
| 1680 | return self.__exit__(None, None, None) |
| 1681 | |
| 1682 | |
| 1683 |