You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -58,6 +58,17 @@ with elementary_test_context(asset=asset) as ctx:
58
58
client.send_to_cloud(ctx)
59
59
```
60
60
61
+
### `raise_on_error`
62
+
63
+
By default, `elementary_test_context` uses `raise_on_error=False`. This means that if a decorated test (or something inside the context) raises an exception, the SDK **captures it and records an `ERROR` execution** so you can still send results to Elementary Cloud without crashing your pipeline.
64
+
65
+
If you prefer **fail-fast** behavior (for example in CI), pass `raise_on_error=True` to re-raise exceptions after they are recorded:
66
+
67
+
```python
68
+
with elementary_test_context(asset=asset, raise_on_error=True) as ctx:
69
+
run_my_tests(df)
70
+
```
71
+
61
72
## Test Decorators
62
73
63
74
The SDK provides decorators to define tests:
@@ -75,15 +86,17 @@ You can also use context managers for inline tests:
75
86
with elementary_test_context(asset=asset) as ctx:
76
87
# Using context managers
77
88
with ctx.boolean_test(name="my_test", description="Inline test") as my_bool_test:
|`owners`| list[str]| No |`None`| List of owners |
51
51
|`metadata`| dict | No |`None`| Additional metadata |
52
-
|`quality_dimension`| QualityDimension | No |`None`| Quality dimension (defaults to VALIDITY if column_name is set) |
53
-
|`skip`| bool | No |`False`| Whether to skip this test |
52
+
|`quality_dimension`| QualityDimension | No |`None`| Quality dimension (defaults to VALIDITY) |
53
+
|`skip`| bool | No |`False`| Whether to skip this test. Useful if you want the test to appear in Elementary Cloud, but you don't want to execute it in this run.|
0 commit comments