Skip to content

Commit

Permalink
removes logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Robb-Fr committed Apr 23, 2024
1 parent d97cbea commit 7b2c830
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions display_controller/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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())

Expand Down

0 comments on commit 7b2c830

Please sign in to comment.