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")
def test_get_threads_local_false(self): res = stools.getThreads() self.assertTrue(isinstance(res, int)) self.assertTrue(res > 0)