Importing `utils_test` opens ports
See original GitHub issueThis is related to https://github.com/dask/distributed/issues/6806 & https://github.com/dask/distributed/issues/6897, but I thought it was separate enough to open an issue.
We import utils_test
in xarray’s test suite. Currently importing distributed.utils_test
does work, including opening ports.
I’m guessing this is caused by https://github.com/dask/distributed/blob/8b3dcadce88d55de81af2f0378d656203d5813ed/distributed/utils_test.py#L113
Beyond just doing more work than I’d expect on import — on a MacOS machine, it pops open a system dialog asking whether that’s OK, every time. And if someone is running something on each file save, this happens on every file save. By default, VSCode will search for tests on every file save, so will trigger this.
I don’t have enough context to know for sure whether there’s some immovable constraint that requires this. But would it be possible to put that in a fixture?
Thanks as ever!
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
When I tried this initially I also wasn’t able to reproduce. But when I went to my “Security & Privacy” settings I saw that I had my firewall turned off. When I enabled the firewall and then ran
pytest distributed
I got the network connection popupsThanks @fjetter
I appreciate the question and empathize with the sentiment. Unfortunately between xarray & PRQL I have my hands full (and, to be transparent, can get around the problem when running xarray tests by uninstalling dask…)