aboutsummaryrefslogtreecommitdiff
path: root/tests/test_utils_filesystem.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_utils_filesystem.py')
-rw-r--r--tests/test_utils_filesystem.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_utils_filesystem.py b/tests/test_utils_filesystem.py
index 654f5c8..c1c9876 100644
--- a/tests/test_utils_filesystem.py
+++ b/tests/test_utils_filesystem.py
@@ -40,12 +40,12 @@ def test_get_mlia_target_profiles() -> None:
@pytest.mark.parametrize("raise_exception", [True, False])
def test_temp_file(raise_exception: bool) -> None:
"""Test temp_file context manager."""
- with contextlib.suppress(Exception):
+ with contextlib.suppress(RuntimeError):
with temp_file() as tmp_path:
assert tmp_path.is_file()
if raise_exception:
- raise Exception("Error!")
+ raise RuntimeError("Error!")
assert not tmp_path.exists()