Skip to content

Commit

Permalink
logger instead of print to debug failure by github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
klamann committed Sep 23, 2024
1 parent 0df0541 commit 48c291f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_emulator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
import os

from luma.emulator.device import capture
Expand All @@ -6,6 +7,8 @@
from raspi_poe_mon.poe_hat import PoeHat
from tests import root_dir

logger = logging.getLogger('raspi_poe_mon')


def test_draw_emulated_image():
data_dir = root_dir / 'data'
Expand All @@ -24,7 +27,7 @@ def test_draw_emulated_image():
# draw a frame using the emulator
renderer = SystemMonitor(poe_hat)
renderer.draw_frame()
print(f"files in {data_dir}: {os.listdir(data_dir)}")
logger.debug(f"files in {data_dir}: {os.listdir(data_dir)}")
screenshot = data_dir / 'luma_000001.png'
assert screenshot.exists()
assert screenshot.stat().st_size > 0

0 comments on commit 48c291f

Please sign in to comment.