Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Err hard when Dask has mismatched versions or lz4 installed #3936

Merged
merged 3 commits into from
Jul 14, 2020

Conversation

mrocklin
Copy link
Member

Fixes #3932

Comment on lines 153 to 155
with pytest.raises(ImportError) as info:
async with Client(s.address, asynchronous=True) as client:
pass
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason this pytest.raises fails to capture the error on my machine. I'm not sure why.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fails on my machine too.

How about switching to error_message approach?

def test_python_version_error(kwargs_matching):
    kwargs_matching["workers"]["worker-0"]["packages"]["python"] = "3.5.1"
    msg = error_message(**kwargs_matching)
    assert "Python" in msg["error"]
    assert "major" in msg["error"]

@mrocklin
Copy link
Member Author

mrocklin commented Jun 30, 2020 via email

@abduhbm
Copy link
Contributor

abduhbm commented Jun 30, 2020

@mrocklin This works too

def test_python_version_error():
    with pytest.raises(ImportError) as info:
        with LocalCluster(
            1,
            processes=False,
            scheduler_port=8786,
            silence_logs=False,
            dashboard_address=None,
        ) as c:
            c.scheduler.workers[c.workers[0].address].versions["packages"][
                "python"
            ] = "3.5.1"
            with Client(c.scheduler.address) as client:
                pass

    assert "Python" in str(info.value)
    assert "major" in str(info.value).lower()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raise on Python major version mismatch?
2 participants