10000 refactor: update footer comment in DataFrameHtmlFormatter to clarify … · kosiew/datafusion-python@a55bfe0 · GitHub
[go: up one dir, main page]

Skip to content

Commit a55bfe0

Browse files
committed
refactor: update footer comment in DataFrameHtmlFormatter to clarify content
1 parent 0625b2f commit a55bfe0

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

python/datafusion/html_formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def format_html(
212212
html.append("</table>")
213213
html.append("</div>")
214214

215-
# Add footer with JavaScript only if needed
215+
# Add footer (JavaScript and messages)
216216
if include_styles and self.enable_cell_expansion:
217217
html.append(self._get_javascript())
218218

python/tests/test_dataframe.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,28 +1540,3 @@ def test_dataframe_repr_html_values(df):
15401540
print(f"HTML output snippet: {html[:500]}...")
15411541

15421542
assert len(matches) > 0, "Expected pattern of values not found in HTML output"
1543-
1544-
html = df._repr_html_()
1545-
assert html is not None
1546-
1547-
# Create a more flexible pattern that handles values being wrapped in spans
1548-
# This pattern will match the sequence of values 1,4,8,2,5,5,3,6,8 regardless of formatting
1549-
pattern = re.compile(
1550-
r"<td[^>]*?>(?:<span[^>]*?>)?1(?:</span>)?</td>.*?"
1551-
+ r"<td[^>]*?>(?:<span[^>]*?>)?4(?:</span>)?</td>.*?"
1552-
+ r"<td[^>]*?>(?:<span[^>]*?>)?8(?:</span>)?</td>.*?"
1553-
+ r"<td[^>]*?>(?:<span[^>]*?>)?2(?:</span>)?</td>.*?"
1554-
+ r"<td[^>]*?>(?:<span[^>]*?>)?5(?:</span>)?</td>.*?"
1555-
+ r"<td[^>]*?>(?:<span[^>]*?>)?5(?:</span>)?</td>.*?"
1556-
+ r"<td[^>]*?>(?:<span[^>]*?>)?3(?:</span>)?</td>.*?"
1557-
+ r"<td[^>]*?>(?:<span[^>]*?>)?6(?:</span>)?</td>.*?"
1558-
+ r"<td[^>]*?>(?:<span[^>]*?>)?8(?:</span>)?</td>",
1559-
re.DOTALL,
1560-
)
1561-
1562-
# Print debug info if the test fails
1563-
matches = re.findall(pattern, html)
1564-
if not matches:
1565-
print(f"HTML output snippet: {html[:500]}...")
1566-
1567-
assert len(matches) > 0, "Expected pattern of values not found in HTML output"

0 commit comments

Comments
 (0)
0