From ec7117eb6c410f8663d74946657abb74ccdd9050 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Wed, 20 Nov 2024 06:03:01 -0300 Subject: [PATCH] Fixed type error for protocol class --- .../lib/base/db_os_executor.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/exasol_integration_test_docker_environment/lib/base/db_os_executor.py b/exasol_integration_test_docker_environment/lib/base/db_os_executor.py index d6f444d13..50d8463a9 100644 --- a/exasol_integration_test_docker_environment/lib/base/db_os_executor.py +++ b/exasol_integration_test_docker_environment/lib/base/db_os_executor.py @@ -37,12 +37,11 @@ class DbOsExecutor(Protocol): concrete implementations in sub-classes ``DockerExecutor`` and ``SshExecutor``. """ - @abstractmethod def exec(self, cmd: str) -> ExecResult: ... def prepare(self): - pass + ... class DockerExecutor(DbOsExecutor): @@ -65,6 +64,9 @@ def exec(self, cmd: str) -> ExecResult: assert self._container return self._container.exec_run(cmd) + def prepare(self): + pass + def close(self): self._container = None if self._client is not None: @@ -145,6 +147,7 @@ def executor(self) -> DbOsExecutor: return DockerExecutor(client, self._container_name) + class SshExecFactory(DbOsExecFactory): @classmethod def from_database_info(cls, info: DatabaseInfo):