Description: Make testProcesses match implementation
Author: Santiago Vila <sanvila@debian.org>
Forwarded: https://github.com/piskvorky/gensim/pull/3564/commits/f45ca29351d36b5c4fea3a1441cf3c9b2b653ae8
Last-Update: 2024-11-11

--- a/gensim/test/test_coherencemodel.py
+++ b/gensim/test/test_coherencemodel.py
@@ -148,7 +148,7 @@
             topics=self.topics1, corpus=self.corpus, dictionary=self.dictionary, coherence='u_mass'
         )
 
-        model, used_cpus = get_model(), mp.cpu_count() - 1
+        model, used_cpus = get_model(),  max(1, mp.cpu_count() - 1)
         self.assertEqual(model.processes, used_cpus)
         for p in range(-2, 1):
             self.assertEqual(get_model(processes=p).processes, used_cpus)
