Stop an active patch.
(self)
| 1597 | |
| 1598 | |
| 1599 | def stop(self): |
| 1600 | """Stop an active patch.""" |
| 1601 | try: |
| 1602 | self._active_patches.remove(self) |
| 1603 | except ValueError: |
| 1604 | # If the patch hasn't been started this will fail |
| 1605 | return None |
| 1606 | |
| 1607 | return self.__exit__(None, None, None) |
| 1608 | |
| 1609 | |
| 1610 |