We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
mypy
ty
1 parent fecb3b8 commit 4ea5a17Copy full SHA for 4ea5a17
1 file changed
cratedb_toolkit/testing/testcontainers/util.py
@@ -177,7 +177,7 @@ class PytestTestcontainerAdapter:
177
"""
178
179
def __init__(self):
180
- self.container: DbContainer
+ self.container: t.Optional[DbContainer] = None
181
self.run_setup()
182
183
@abstractmethod
@@ -205,7 +205,11 @@ def run_setup(self):
205
self.start()
206
207
def start(self):
208
+ if self.container is None:
209
+ raise ValueError("Container not initialized")
210
self.container.start()
211
212
def stop(self):
213
214
215
self.container.stop()
0 commit comments