diff --git a/tests/test_aircraft.py b/tests/test_aircraft.py index 9f83b918f..5fc4150d5 100644 --- a/tests/test_aircraft.py +++ b/tests/test_aircraft.py @@ -1,4 +1,3 @@ -from os import makedirs from pathlib import Path from platform import uname from sys import platform @@ -334,11 +333,10 @@ def test_prepare_image_for_all_planes(model, lcd, resources, img_precision, requ set_bios_during_test(aircraft_model, bios_pairs) img = aircraft_model.prepare_image() ref_file_base_path = resources / platform / uname().release if platform == 'win32' else resources / platform - makedirs(name=ref_file_base_path, exist_ok=True) - if uname().release == '2022Server': - img.save(ref_file_base_path / f'{model}_{lcd}_{type(aircraft_model).__name__}.png') - else: - assert compare_images(img=img, file_path=ref_file_base_path / f'{model}_{lcd}_{type(aircraft_model).__name__}.png', precision=img_precision) + # if 'f4e' in model: + # img.save(ref_file_base_path / f'new_{model}_{lcd}_{type(aircraft_model).__name__}.png') + # else: + assert compare_images(img=img, file_path=ref_file_base_path / f'{model}_{lcd}_{type(aircraft_model).__name__}.png', precision=img_precision) @mark.benchmark @@ -364,11 +362,7 @@ def test_prepare_image_for_apache_wca_mode(model, resources, img_precision, requ img = apache.prepare_image() assert (Path(gettempdir()) / f'{type(apache).__name__}_999.png').exists() ref_file_base_path = resources / platform / uname().release if platform == 'win32' else resources / platform - makedirs(name=ref_file_base_path, exist_ok=True) - if uname().release == '2022Server': - img.save(ref_file_base_path / f'{model}_wca_mode.png') - else: - assert compare_images(img=img, file_path=ref_file_base_path / f'{model}_wca_mode.png', precision=img_precision) + assert compare_images(img=img, file_path=ref_file_base_path / f'{model}_wca_mode.png', precision=img_precision) # <=><=><=><=><=> Apache special <=><=><=><=><=> @@ -392,11 +386,7 @@ def test_apache_wca_more_then_one_screen_scrolled(model, resources, img_precisio assert apache.warning_line == 3 img = apache.prepare_image() ref_file_base_path = resources / platform / uname().release if platform == 'win32' else resources / platform - makedirs(name=ref_file_base_path, exist_ok=True) - if uname().release == '2022Server': - img.save(ref_file_base_path / f'{model}_wca_mode_scroll_3.png') - else: - assert compare_images(img=img, file_path=ref_file_base_path / f'{model}_wca_mode_scroll_3.png', precision=img_precision) + assert compare_images(img=img, file_path=ref_file_base_path / f'{model}_wca_mode_scroll_3.png', precision=img_precision) for i in range(1, 3): apache.warning_line += 1 @@ -405,11 +395,7 @@ def test_apache_wca_more_then_one_screen_scrolled(model, resources, img_precisio img = apache.prepare_image() assert apache.warning_line == 1 ref_file_base_path = resources / platform / uname().release if platform == 'win32' else resources / platform - makedirs(name=ref_file_base_path, exist_ok=True) - if uname().release == '2022Server': - img.save(ref_file_base_path / f'{model}_wca_mode_scroll_1.png') - else: - assert compare_images(img=img, file_path=ref_file_base_path / f'{model}_wca_mode_scroll_1.png', precision=img_precision) + assert compare_images(img=img, file_path=ref_file_base_path / f'{model}_wca_mode_scroll_1.png', precision=img_precision) @mark.benchmark @@ -419,8 +405,4 @@ def test_apache_pre_mode(model, apache_pre_mode_bios_data, resources, img_precis set_bios_during_test(apache, apache_pre_mode_bios_data) img = apache.prepare_image() ref_file_base_path = resources / platform / uname().release if platform == 'win32' else resources / platform - makedirs(name=ref_file_base_path, exist_ok=True) - if uname().release == '2022Server': - img.save(ref_file_base_path / f'{model}_pre_mode.png') - else: - assert compare_images(img=img, file_path=ref_file_base_path / f'{model}_pre_mode.png', precision=img_precision) + assert compare_images(img=img, file_path=ref_file_base_path / f'{model}_pre_mode.png', precision=img_precision)