def test_impl(keys1, values1, keys2, values2): a_dict = ConcurrentDict.fromkeys(keys1, values1[0]) for k, v in zip(keys1, values1): a_dict[k] = v other_dict = ConcurrentDict.fromkeys(keys2, values2[0]) for k, v in zip(keys2, values2): other_dict[k] = v r1 = len(a_dict) a_dict.update(other_dict) r2 = len(a_dict) check_keys = np.array([k in a_dict for k in keys2]) return r1, r2, np.all(check_keys)
def test_impl(keys, values): a_dict = ConcurrentDict.fromkeys(keys, values[0]) for k, v in zip(keys, values): a_dict[k] = v res = [] for k in a_dict: res.append(k) return res
def test_impl(keys, values): a_dict = ConcurrentDict.fromkeys(keys, values[0]) for k, v in zip(keys, values): a_dict[k] = v dict_iter = iter(a_dict) r1 = next(dict_iter) r2 = next(dict_iter) r3 = next(dict_iter) return r1, r2, r3
def test_impl(keys, value): a_dict = ConcurrentDict.fromkeys(keys, value) check_keys = np.array([k in a_dict for k in keys]) return len(a_dict), np.all(check_keys)
def test_impl(keys, values): a_dict = ConcurrentDict.fromkeys(keys, values[0]) r1 = len(a_dict) a_dict.clear() r2 = len(a_dict) return r1, r2
def test_impl(key, value, default): a_dict = ConcurrentDict.fromkeys([key], value) r1 = a_dict.get(key, None) r2 = a_dict.get(2 * key, default) r3 = a_dict.get(2 * key) return r1, r2, r3
def test_impl(key, value): a_dict = ConcurrentDict.fromkeys([key], value) r1 = a_dict.pop(2 * key) r2 = a_dict.pop(2 * key, 2 * value) return r1, r2
def test_impl(key, value): a_dict = ConcurrentDict.fromkeys([key], value) r1 = a_dict.pop(key) return r1, len(a_dict), a_dict.get(key, None)
def test_impl(key, value): a_dict = ConcurrentDict.fromkeys([key], value) return key in a_dict, 2 * key in a_dict
def test_impl(key, value, new_value): a_dict = ConcurrentDict.fromkeys([key], value) a_dict[key] = new_value return a_dict[key]
def wrapper_impl(self, keys, value): return ConcurrentDict.fromkeys(keys, value)