File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 77
88from .javascript import (
99 generate_init_offline_itables_html ,
10+ replace_value ,
1011 to_html_datatable ,
1112)
1213from .typing import DataFrameOrSeries , ITableOptions
@@ -57,7 +58,11 @@ def DT(
5758
5859 script_end = "\n });\n </script>\n "
5960 assert html .endswith (script_end )
60- assert "let dt = new ITable" in html
61+ html = replace_value (
62+ html ,
63+ "new ITable(table, dt_args);" ,
64+ "let dt = new ITable(table, dt_args);" ,
65+ )
6166
6267 selected_rows_code = f"""
6368 function set_selected_rows_in_shiny(...args) {{
Original file line number Diff line number Diff line change @@ -75,3 +75,7 @@ def test_shiny_apps_are_valid_python_scripts(
7575 if error in result .stderr :
7676 pytest .xfail (error )
7777 assert result .returncode == 0 , f"Process failed: { result .stderr } "
78+
79+
80+ def test_table_id_in_DT ():
81+ DT (df = None , table_id = "my_table1" )
You can’t perform that action at this time.
0 commit comments