Automatically configure all tests using autouse fixture#6802
Automatically configure all tests using autouse fixture#6802hendrikmakait wants to merge 4 commits intodask:mainfrom
Conversation
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 15 files ±0 15 suites ±0 6h 44m 31s ⏱️ + 32m 51s For more details on these failures, see this check. Results for commit 20dcf92. ± Comparison against base commit 236945a. |
jrbourbeau
left a comment
There was a problem hiding this comment.
Thanks @hendrikmakait. It'd be great to have tests automatically configured with a pytest.fixture. I gave this a shot over in #5242 which we ended up reverting in #5300 because it impacted other projects (e.g. like dask/dask) that use testing utilities like gen_cluster. I've not thought too deeply about the implementation here, but wanted to make sure whatever changes we make still allow downstream projects to use gen_cluster, etc.
|
@jrbourbeau: The way this is currently implemented, nothing changes for existing fixtures, we simply apply |
|
As a caveat, if you |
|
@hendrikmakait I also opened a PR to detect the profiler in tests in general: #6819 |
|
As described in #6498, this has become superfluous for now. |
Closes #6498
This PR effectively turns
_reconfigureinto anautousefixture that resets the configuration for each test. As a caveat, in some tests_reconfigure()is now run twice, but this should not cause any issues.pre-commit run --all-files