Hi all,
I am trying to run my dash tests using the dash_process_server
. However, the server is not starting up correctly.
I have created the following fixture in pytest (analogue to the test
fixture in dash_table on github)
@pytest.fixture
def test_waitress(request, dash_process_server, tmpdir):
with DataTableComposite(
dash_process_server,
browser=request.config.getoption(“webdriver”),
remote=request.config.getoption(“remote”),
remote_url=request.config.getoption(“remote_url”),
headless=request.config.getoption(“headless”),
options=request.config.hook.pytest_setup_options(),
percy_finalize=request.config.getoption(“nopercyfinalize”),
) as dc:
yield dc
and start the server inside my test via test_waitress.start_server(app)
Looking at the debugger I see that waitress is called on the command line with the following command:
waitress-serve --listen=0.0.0.0:1965 <dash.dash.Dash object at 0x7f4506d8a50>:app.server
So it seems that I would need to pass the path to my module instead of the dash app
. However that makes me wonder whether this is the right way to run tests via waitress anyway.
Also I would like to run my tests with multiple processes (waitress is only running multi-thread) because I experienced several occasions where an app would run fine single-process but run into infinite recursions in multi-process. Is there anyway to run tests with multiple processes right now?
Thanks for any hints!
Benjamin