summaryrefslogtreecommitdiff
path: root/test/test_misc/test_input_source.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_misc/test_input_source.py')
-rw-r--r--test/test_misc/test_input_source.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/test/test_misc/test_input_source.py b/test/test_misc/test_input_source.py
index f3da062b..90e6e238 100644
--- a/test/test_misc/test_input_source.py
+++ b/test/test_misc/test_input_source.py
@@ -11,6 +11,7 @@ from dataclasses import dataclass
# from itertools import product
from pathlib import Path
from test.utils import GraphHelper
+from test.utils.exceptions import ExceptionChecker
from test.utils.httpfileserver import (
HTTPFileInfo,
HTTPFileServer,
@@ -27,7 +28,6 @@ from typing import ( # Callable,
Generic,
Iterable,
Optional,
- Pattern,
TextIO,
Tuple,
Type,
@@ -251,21 +251,6 @@ def call_create_input_source(
yield input_source
-@dataclass
-class ExceptionChecker:
- type: Type[Exception]
- pattern: Optional[Pattern[str]] = None
-
- def check(self, exception: Exception) -> None:
- try:
- assert isinstance(exception, self.type)
- if self.pattern is not None:
- assert self.pattern.match(f"{exception}")
- except Exception:
- logging.error("problem checking exception", exc_info=exception)
- raise
-
-
AnyT = TypeVar("AnyT")