Skip to content

Commit 93389d9

Browse files
authored
Attempt to fix playwright tests (#1357)
1 parent 4419fe9 commit 93389d9

File tree

2 files changed

+6
-5
lines changed
  • examples/model-score
  • tests/playwright/shiny/components/nav

2 files changed

+6
-5
lines changed

examples/model-score/app.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ def df():
4848
params=[150],
4949
)
5050
# Convert timestamp to datetime object, which SQLite doesn't support natively
51-
tbl["timestamp"] = pd.to_datetime(tbl["timestamp"], utc=True)
51+
tbl["timestamp"] = pd.to_datetime(
52+
tbl["timestamp"], utc=True, format="%Y-%m-%d %H:%M:%S.%f"
53+
)
5254
# Create a short label for readability
5355
tbl["time"] = tbl["timestamp"].dt.strftime("%H:%M:%S")
5456
# Reverse order of rows
@@ -64,7 +66,9 @@ def read_time_period(from_time, to_time):
6466
params=[from_time, to_time],
6567
)
6668
# Treat timestamp as a continuous variable
67-
tbl["timestamp"] = pd.to_datetime(tbl["timestamp"], utc=True)
69+
tbl["timestamp"] = pd.to_datetime(
70+
tbl["timestamp"], utc=True, format="%Y-%m-%d %H:%M:%S.%f"
71+
)
6872
tbl["time"] = tbl["timestamp"].dt.strftime("%H:%M:%S")
6973

7074
return tbl

tests/playwright/shiny/components/nav/app.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ def make_navset(
110110
make_navset(
111111
"navset_bar", ui.navset_bar, title=True, sidebar=True, headerfooter=True
112112
),
113-
make_navset(
114-
"navset_bar", ui.navset_bar, title=True, sidebar=True, headerfooter=True
115-
),
116113
make_navset("navset_tab", ui.navset_tab, headerfooter=True),
117114
make_navset("navset_pill", ui.navset_pill, headerfooter=True),
118115
make_navset("navset_underline", ui.navset_underline, headerfooter=True),

0 commit comments

Comments
 (0)