| 226 | |
| 227 | |
| 228 | class ExThread(threading.Thread): |
| 229 | def __init__(self, target: Callable[[], None], name: str) -> None: |
| 230 | super().__init__(target=target, name=name) |
| 231 | self.ex: _ExcInfoType | None = None |
| 232 | |
| 233 | def run(self) -> None: |
| 234 | try: |
| 235 | super().run() |
| 236 | except Exception: # pragma: no cover |
| 237 | self.ex = sys.exc_info() # pragma: no cover |
| 238 | |
| 239 | def join(self, timeout: float | None = None) -> None: |
| 240 | super().join(timeout=timeout) |
| 241 | if self.ex is not None: |
| 242 | raise RuntimeError from self.ex[1] # pragma: no cover |
| 243 | |
| 244 | |
| 245 | @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) |
no outgoing calls
searching dependent graphs…