-
-
Notifications
You must be signed in to change notification settings - Fork 718
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
Conversation
distributed/tests/test_versions.py
Outdated
with pytest.raises(ImportError) as info: | ||
async with Client(s.address, asynchronous=True) as client: | ||
pass |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"]
Yes, we could, but I would feel more comfortable testing the user behavior
rather than the internal function if we can find a way to make this work.
…On Tue, Jun 30, 2020 at 7:46 AM Abdulelah Bin Mahfoodh < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In distributed/tests/test_versions.py
<#3936 (comment)>:
> + with pytest.raises(ImportError) as info:
+ async with Client(s.address, asynchronous=True) as client:
+ pass
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"]
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3936 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACKZTBXJMXCUBXK347BBRDRZH3EVANCNFSM4OLVZJEA>
.
|
@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() |
Fixes #3932