Skip to content

Commit 894de55

Browse files
committed
fix(testing): return [] instead of None from get_logs for non-Chrome browsers
When running tests with non-Chrome drivers, get_logs() returned None, causing assertions like `assert dash_duo.get_logs() == []` to fail. Returning an empty list is consistent with the Chrome path, which also returns an empty list when there are no logs.
1 parent a81f4e8 commit 894de55

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dash/testing/browser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,10 @@ def get_logs(self):
629629
if entry["timestamp"] > self._last_ts
630630
]
631631
warnings.warn(
632-
"get_logs always return None with webdrivers other than Chrome",
632+
"get_logs always return [] with webdrivers other than Chrome",
633633
stacklevel=2,
634634
)
635-
return None
635+
return []
636636

637637
def reset_log_timestamp(self):
638638
"""reset_log_timestamp only work with chrome webdriver."""

0 commit comments

Comments
 (0)