def test_unregister_all(self): """ Unregister all tasks at a time. """ unregister_tasks(*self.names) for name in self.names: self.assertNotIn(name, TASKS_BY_ID)
def test_unregister(self): """ Unregister one by one """ for name in self.names: unregister_tasks(name) self.assertNotIn(name, TASKS_BY_ID)
def test_unregister_clear(self): """ Unregister all tasks with an empty parameter. """ _TASKS_BY_ID = TASKS_BY_ID.copy() unregister_tasks() self.assertFalse(TASKS_BY_ID) TASKS_BY_ID.update(_TASKS_BY_ID)