dash
dash copied to clipboard
[BUG] Installing dash breaks ability to run selenium / pylenium tests
Describe your context Please provide us your environment, so we can easily reproduce the issue.
- replace the result of
pip list | grep dash
below
dash 2.3.1
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-table 5.0.0
Describe the bug
After installing dash pylenium can't start the webdriver anymore:
$ pytests
...
$ poetry add dash==2.3.1
...
$ pytests
...
E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=4444): Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fcd3eed0460>: Failed to establish a new connection: [Errno 111] Connection refused'))
The full output is quite overwhelming since it triggers several errors in a cascade while trying to setup and tear down the test fixtures.
localhost:4444 is where the webdriver server should respond.
Expected behavior
That tests still work.
Screenshots
Repository to reproduce the error: https://github.com/rnestler/minimal-pylenium-dash-example
Full output of the failure: output.txt
I debugged it a bit further: I can install every dependency of dash except dash itself and the tests still work! So something in the dash package itself must be the issue.
OK the culprit seems to be the dash/testing/plugin.py
. When I just emty the file with echo > /home/raphael/.cache/pypoetry/virtualenvs/minimal-pylenium-dash-example-0I1Y-mga-py3.10/lib/python3.10/site-packages/dash/testing/plugin.py
then the tests work again.
Ah I can also disable it with pytest -p no:dash
Is this maybe related to #1690?
@bmerry Looks related to the test plugin as well, yes. I guess disabling it with pytest -p no:dash
could work for you as well as a workaround.