def __init__(self, flow, flow_detail, backend, options): self._flow = flow self._flow_detail = flow_detail self._backend = backend self._options = misc.safe_copy_dict(options) self._notifier = notifier.Notifier() self._atom_notifier = notifier.Notifier()
def __init__(self, name, jobboard, persistence=None, engine=None, engine_options=None): self._name = name self._jobboard = jobboard self._engine = engine self._engine_options = misc.safe_copy_dict(engine_options) self._persistence = persistence self._lock = threading.RLock() self._notifier = notifier.Notifier()
def __init__(self, compilation, storage, atom_notifier, task_executor, retry_executor, options=None): self._atom_notifier = atom_notifier self._task_executor = task_executor self._retry_executor = retry_executor self._storage = storage self._compilation = compilation self._atom_cache = {} self._options = misc.safe_copy_dict(options)
def test_mutated_post_copy(self): a = {"a": "b"} a_2 = misc.safe_copy_dict(a) a['a'] = 'c' self.assertEqual("b", a_2['a']) self.assertEqual("c", a['a'])
def test_expected(self): self.assertEqual(self.expected, misc.safe_copy_dict(self.original)) self.assertFalse(self.expected is misc.safe_copy_dict(self.original))