Ejemplo n.º 1
0
 def test_get_threads_local_true(self):
     # create .threads.p
     with open("threads.p", "wb") as file:
         pickle.dump(2, file)
     res = stools.getThreads(wd=os.getcwd())
     self.assertEqual(res, 2)
     os.remove("threads.p")
Ejemplo n.º 2
0
 def test_get_threads_local_false(self):
     res = stools.getThreads()
     self.assertTrue(isinstance(res, int))
     self.assertTrue(res > 0)