diff --git a/test/integration/http_transport_errors_test.py b/test/integration/http_transport_errors_test.py index 5f7b5a2..b2efce9 100644 --- a/test/integration/http_transport_errors_test.py +++ b/test/integration/http_transport_errors_test.py @@ -52,14 +52,9 @@ def test_error_in_export_callback(connection, statement): def export_cb(pipe, dst, **kwargs): raise Exception(error_msg) - with pytest.raises(Exception) as exec_info: + with pytest.raises(Exception, matches=error_msg): connection.export_to_callback(export_cb, None, statement) - expected = error_msg - actual = f"{exec_info.value}" - - assert actual == expected - @pytest.mark.etl @pytest.mark.exceptions