mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-09 19:12:59 +00:00
Update conftest.py
This commit is contained in:
12
conftest.py
12
conftest.py
@@ -108,12 +108,16 @@ class TrackedContainer:
|
||||
return logs
|
||||
|
||||
@staticmethod
|
||||
def get_warnings(logs: str) -> list[str]:
|
||||
return [line for line in logs.split("\n") if line.startswith("WARNING")]
|
||||
def get_errors(logs: str) -> list[str]:
|
||||
return _lines_starting_with(logs, "ERROR")
|
||||
|
||||
@staticmethod
|
||||
def get_errors(logs: str) -> list[str]:
|
||||
return [line for line in logs.split("\n") if line.startswith("ERROR")]
|
||||
def get_warnings(logs: str) -> list[str]:
|
||||
return _lines_starting_with(logs, "WARNING")
|
||||
|
||||
@staticmethod
|
||||
def _lines_starting_with(logs: str, pattern: str) -> list[str]:
|
||||
return [line for line in logs.splitlines() if line.startswith(pattern)]
|
||||
|
||||
def remove(self):
|
||||
"""Kills and removes the tracked docker container."""
|
||||
|
Reference in New Issue
Block a user