diff options
Diffstat (limited to 'tests/test_timeout_decorator.py')
-rw-r--r-- | tests/test_timeout_decorator.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test_timeout_decorator.py b/tests/test_timeout_decorator.py index 52b0e97..536bc8f 100644 --- a/tests/test_timeout_decorator.py +++ b/tests/test_timeout_decorator.py @@ -89,12 +89,10 @@ def test_timeout_pickle_error(): def test_timeout_custom_exception_message(): - message = "Custom fail message" - - @timeout(seconds=1, exception_message=message) + @timeout(seconds=1, exception_message="Custom fail message") def f(): time.sleep(2) - with pytest.raises(TimeoutError, match=message): + with pytest.raises(TimeoutError, match="Custom fail message"): f() |