I had my second PR merged into the Dask Distributed project.
The fantastic thing about contributing to Open Source projects is that you can always learn something new! Today I learned how to set a dependency to be missing, so it throws an ImportError with pytest.
The fantastic thing about contributing to Open Source projects is that you can always learn something new! Today I learned how to set a dependency to be missing, so it throws an ImportError with pytest.
@pytest.mark.asyncio async def test_ssh_cluster_raises_if_asyncssh_not_installed(monkeypatch, cleanup): monkeypatch.setitem(sys.modules, "asyncssh", None)
Using monkeypatch, we can set the dependency asyncssh as missing and that will trigger the ImportError. Special thank you to James Bourbeau for helping me with this!