def test_partial_hosts(self, bash, hosts, prefix): first_char, partial_hosts = partialize(bash, hosts) completion = assert_complete(bash, "xhost %s%s" % (prefix, first_char)) if len(completion) == 1: assert completion == partial_hosts[0][1:] else: assert completion == sorted(x for x in partial_hosts)
def test_partial_hostname(self, bash, known_hosts): first_char, partial_hosts = partialize(bash, known_hosts) completion = assert_complete(bash, "ssh %s" % first_char) if len(completion) == 1: assert completion == partial_hosts[0][1:] else: assert completion == sorted(x for x in partial_hosts)
def test_partial_hosts(self, bash, hosts, prefix): first_char, partial_hosts = partialize(bash, hosts) completion = assert_complete(bash, f"xhost {prefix}{first_char}") if len(completion) == 1: assert completion == partial_hosts[0][1:] else: assert completion == sorted(f"{prefix}{x}" for x in partial_hosts)
def test_partial_hostname(self, bash, known_hosts): first_char, partial_hosts = partialize(bash, known_hosts) user = "******" completion = assert_complete(bash, f"finger {user}@{first_char}") if len(completion) == 1: assert completion == partial_hosts[0][1:] else: assert completion == [f"{user}@{x}" for x in partial_hosts]
def test_partial_hostname(self, bash, known_hosts): first_char, partial_hosts = partialize(bash, known_hosts) user = "******" completion = assert_complete(bash, "finger %s@%s" % (user, first_char)) if len(completion) == 1: assert completion == partial_hosts[0][1:] else: assert completion == ["%s@%s" % (user, x) for x in partial_hosts]
def test_partial_hostname(self, bash, known_hosts): first_char, partial_hosts = partialize(bash, known_hosts) user = "******" completion = assert_complete(bash, "finger %s@%s" % (user, first_char)) assert completion == [x[1:] for x in partial_hosts]
def test_partial_hosts(self, bash, hosts, prefix): first_char, partial_hosts = partialize(bash, hosts) completion = assert_complete(bash, "xhost %s%s" % (prefix, first_char)) assert completion == sorted(x[1:] for x in partial_hosts)
def test_partial_hostname(self, bash, known_hosts): first_char, partial_hosts = partialize(bash, known_hosts) completion = assert_complete(bash, "ssh %s" % first_char) assert completion == sorted(x[1:] for x in partial_hosts)