dash_duo.get_logs() returns None instead of an empty list
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
Thank you so much for helping improve the quality of Dash!
We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.
Describe your context
Please provide us your environment, so we can easily reproduce the issue.
- replace the result of
pip list | grep dashbelow
dash 2.14.2
dash-auth 2.0.0
dash-bootstrap-components 1.5.0
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-table 5.0.0
dash-testing-stub 0.0.2
jupyter-dash 0.4.2
-
if frontend related, tell us your Browser, Version and OS
- OS: OSX
- Browser chromedriver 120
Describe the bug
Tests such as this one: https://github.com/oegedijk/explainerdashboard/blob/3ae3fe6488cac234512014799895fff562143395/tests/integration_tests/test_dashboards.py#L8
on explainerdashboard are failing due to dash_duo.get_logs() not returning an empty list as expected but instead returning None. Both locally and in the github actions CI.
def test_classification_dashboard(dash_duo, precalculated_rf_classifier_explainer):
db = ExplainerDashboard(
precalculated_rf_classifier_explainer, title="testing", responsive=False
)
html = db.to_html()
assert html.startswith(
"\n<!DOCTYPE html>\n<html"
), "failed to generate dashboard to_html"
dash_duo.start_server(db.app)
dash_duo.wait_for_text_to_equal("h1", "testing", timeout=30)
> assert dash_duo.get_logs() == [], "browser console should contain no error"
E AssertionError: browser console should contain no error
E assert None == []
E + where None = <bound method Browser.get_logs of <dash.testing.composite.DashComposite object at 0x13dafd660>>()
E + where <bound method Browser.get_logs of <dash.testing.composite.DashComposite object at 0x13dafd660>> = <dash.testing.composite.DashComposite object at 0x13dafd660>.get_logs
Expected behavior
Should return [] as before.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the dash.testing.composite.DashComposite.get_logs method and compare its behavior with the integration test in tests/integration_tests/test_dashboards.py. Reproduce the failing assertion in the linked explainerdashboard test, then verify that get_logs() returns [] when the browser console has no errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100