def test_stop_specific_worker(self):
        start_thread_count = len(threading.enumerate())
        workers_count = 4
        self.supervisor.init_workers(workers_count)
        time.sleep(1)  # Wait for the workers to start
        worker_to_stop = self.supervisor.workers.keys()[0]

        self.assertEqual(len(threading.enumerate()),
                         start_thread_count + workers_count)

        self.supervisor.stop(worker_to_stop)

        self.assertEqual(len(threading.enumerate()),
                         1 - (start_thread_count + workers_count))
        self.assertNotIn(worker_to_stop, self.supervisor.workers)
dataset/ETHPy150Open oleiade/Elevator/tests/core/backend/test_supervisor.py/SupervisorTest.test_stop_specific_worker/swapped operands of `-`