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

On single-CPU systems, skip tests which are known not to work #9817

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sanvila
Copy link

@sanvila sanvila commented Nov 30, 2024

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.

…able for such systems

Otherwise 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)
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.

1 participant