Exemple #1
0
 def test_win32(self):
     old = os.environ.get("NUMBER_OF_PROCESSORS", None)
     try:
         os.environ["NUMBER_OF_PROCESSORS"] = "2"
         self.assertEqual(cpu_count(), 2)
     finally:
         if old is not None:
             os.environ["NUMBER_OF_PROCESSORS"] = old
Exemple #2
0
 def test_win32(self):
     old = os.environ.get("NUMBER_OF_PROCESSORS", None)
     try:
         os.environ["NUMBER_OF_PROCESSORS"] = "2"
         self.assertEqual(cpu_count(), 2)
     finally:
         if old is not None:
             os.environ["NUMBER_OF_PROCESSORS"] = old
Exemple #3
0
 def test_bsd(self):
     self.assertEqual(cpu_count(), 3)
Exemple #4
0
 def test_native(self):
     self.assertTrue(cpu_count() > 0)
Exemple #5
0
 def test_bsd(self):
     self.assertEqual(cpu_count(), 3)
Exemple #6
0
 def test_native(self):
     self.assertTrue(cpu_count() > 0)