Skip to content

Commit 2529109

Browse files
committed
Generalized Raw* class checking
1 parent 8affdc0 commit 2529109

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

python/tests/test_wrapper_coverage.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,13 @@ def missing_exports(internal_obj, wrapped_obj) -> None:
3434
return
3535

3636
for attr in dir(internal_obj):
37-
# Skip internal context and RawExpr (which is handled by Expr class)
38-
if attr in ["_global_ctx", "RawExpr"]:
37+
if attr in ["_global_ctx"]:
3938
continue
4039

41-
# Check if RawExpr functionality is covered by Expr class
42-
if attr == "RawExpr" and hasattr(wrapped_obj, "Expr"):
43-
expr_class = getattr(wrapped_obj, "Expr")
44-
assert hasattr(expr_class, "raw_expr"), "Expr class must provide raw_expr property"
40+
# Check if Raw* classes have corresponding wrapper classes
41+
if attr.startswith("Raw"):
42+
base_class = attr[3:] # Remove "Raw" prefix
43+
assert hasattr(wrapped_obj, base_class), f"Missing implementation for {attr}"
4544
continue
4645

4746
internal_attr = getattr(internal_obj, attr)

0 commit comments

Comments
 (0)