mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-12 20:42:57 +00:00
Update conftest.py
This commit is contained in:
10
conftest.py
10
conftest.py
@@ -103,15 +103,17 @@ class TrackedContainer:
|
|||||||
if no_warnings:
|
if no_warnings:
|
||||||
assert not self.get_warnings(logs)
|
assert not self.get_warnings(logs)
|
||||||
if no_errors:
|
if no_errors:
|
||||||
assert "ERROR" not in logs
|
assert not self.get_errors(logs)
|
||||||
assert rv == 0 or rv["StatusCode"] == 0
|
assert rv == 0 or rv["StatusCode"] == 0
|
||||||
return logs
|
return logs
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_warnings(logs: str) -> list[str]:
|
def get_warnings(logs: str) -> list[str]:
|
||||||
return [
|
return [l for in logs.split("\n") if l.startswith("WARNING")]
|
||||||
warning for warning in logs.split("\n") if warning.startswith("WARNING")
|
|
||||||
]
|
@staticmethod
|
||||||
|
def get_errrors(logs: str) -> list[str]:
|
||||||
|
return [l for l in logs.split("\n") if l.startswith("ERROR")]
|
||||||
|
|
||||||
def remove(self):
|
def remove(self):
|
||||||
"""Kills and removes the tracked docker container."""
|
"""Kills and removes the tracked docker container."""
|
||||||
|
Reference in New Issue
Block a user