On single-CPU systems, skip tests which are known not to work #9817
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello. While building this package on a single-CPU system I noticed that two tests fail.
test_cpu_affinity_neighbor_loader()
fails in this way:E ValueError: More workers (got 2) than available cores (got 1)
and
test_multithreading_neighbor_loader()
fails in this way:E ValueError: 'worker_threads' should be smaller than the total available number of threads 1 (got 2)
I guess those tests are simply not suitable to be executed on single-CPU systems, so the proposed MR uses
os.cpu_count()
to test before executing them.The failures may be reproduced easily by booting with
GRUB_CMDLINE_LINUX="nr_cpus=1"
.Thanks.