From 7b2c830d5597b442f73416f59f82e5900e3b8a68 Mon Sep 17 00:00:00 2001 From: Robb-Fr Date: Tue, 23 Apr 2024 14:49:32 +0200 Subject: [PATCH] removes logging --- .github/workflows/python-app.yml | 1 + display_controller/tests.py | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 6fcba7e..c8a4977 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -27,6 +27,7 @@ jobs: run: | python -m pip install --upgrade pip pip install ruff numpy==1.26.4 pillow==10.3.0 + cd display_controller && pip install -r requirements.txt - name: Lint with ruff run: | cd display_controller && ruff check *.py lib/*.py -v diff --git a/display_controller/tests.py b/display_controller/tests.py index 26f2d40..eaa7a3b 100644 --- a/display_controller/tests.py +++ b/display_controller/tests.py @@ -2,9 +2,6 @@ import os from lib import create_to_display_image, parse_api_result, font from PIL import Image, ImageChops -import logging - -logging.basicConfig(level=logging.DEBUG) TEST_RESULT_FILENAME = "api_result_test.tsv" TEST_IMAGE_FILENAME = "test_display.bmp" @@ -35,16 +32,12 @@ def test_parse_result(self): def test_generate_image(self): to_display = parse_api_result(test_result_filepath) - logging.debug(to_display) test_image = create_to_display_image( to_display, IMAGE_WIDTH, IMAGE_HEIGHT, font ) with Image.open(test_image_filepath) as expected_image: - for i, (b_t, b_e) in enumerate(zip(test_image.tobytes(), expected_image.tobytes())): - if b_t != b_e: - print(f"diff on pixel {i}: {b_t} != {b_e}") diff = ImageChops.difference(test_image, expected_image) self.assertIsNone(diff.getbbox())