Skip to content

Commit c109ad2

Browse files
committed
docs: Add docstring to normalize_uuid function for clarity in testing
1 parent 2751759 commit c109ad2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

python/tests/test_dataframe.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,19 @@ def span_expandable_class():
6363

6464

6565
def normalize_uuid(html):
66+
"""
67+
Normalize UUIDs in HTML content by replacing them with a static string.
68+
69+
This is used in testing to ensure consistent output when comparing HTML
70+
representations that contain randomly generated UUIDs (like element IDs),
71+
allowing for meaningful comparison of structure and content.
72+
73+
Args:
74+
html: HTML string possibly containing UUIDs
75+
76+
Returns:
77+
HTML string with all UUIDs replaced by "STATIC_UUID"
78+
"""
6679
return re.sub(
6780
r"[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",
6881
"STATIC_UUID",

0 commit comments

Comments
 (0)