]>
git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/cephadm/tests/test_completion.py
3 from ..module
import forall_hosts
6 class TestCompletion(object):
8 @pytest.mark
.parametrize("input,expected", [
11 (["hallo"], ["('hallo',)"]),
12 ("hi", ["('h',)", "('i',)"]),
13 (list(range(5)), [str((x
, )) for x
in range(5)]),
14 ([(1, 2), (3, 4)], ["(1, 2)", "(3, 4)"]),
16 def test_async_map(self
, input, expected
, cephadm_module
):
18 def run_forall(*args
):
20 assert run_forall(input) == expected
22 @pytest.mark
.parametrize("input,expected", [
25 (["hallo"], ["('hallo',)"]),
26 ("hi", ["('h',)", "('i',)"]),
27 (list(range(5)), [str((x
, )) for x
in range(5)]),
28 ([(1, 2), (3, 4)], ["(1, 2)", "(3, 4)"]),
30 def test_async_map_self(self
, input, expected
, cephadm_module
):
36 def run_forall(self
, *args
):
40 assert Run().run_forall(input) == expected