diff --git a/tests/test_invocation_contexts.py b/tests/test_invocation_contexts.py index bed21716..657e6347 100644 --- a/tests/test_invocation_contexts.py +++ b/tests/test_invocation_contexts.py @@ -225,7 +225,7 @@ def run_function_in_thread_and_propagate_cancellation(func, *args): t = ThreadWithInvocationID(target=func, args=args) t.start() try: - t.join_and_propagate_cancel(1) + t.join_and_propagate_cancel(0.04) except InvocationCancelledError: # We still want to return the finished thread if it's # cancelled. diff --git a/tests/test_server_config_model.py b/tests/test_server_config_model.py index 11010282..6f9cb525 100644 --- a/tests/test_server_config_model.py +++ b/tests/test_server_config_model.py @@ -109,14 +109,14 @@ def test_unimportable_modules(): with pytest.raises( ThingImportFailure, - match="\[RuntimeError\] This module should not be importable!", + match=r"\[RuntimeError\] This module should not be importable!", ): # This checks RuntimErrors get reported with a single error ThingConfig(cls="tests.unimportable.runtimeerror:SomeClass") with pytest.raises( ThingImportFailure, - match="\[ValueError\] This module should not be importable due to ValueError!", + match=r"\[ValueError\] This module should not be importable due to ValueError!", ): # This checks ValueErrors get reported with a single error # rather than getting swallowed by a ValidationError