unit test updates

- Add XVFB (virtual display)
  - Re-activate viewer gui test
This commit is contained in:
torzdf 2023-01-17 16:20:16 +00:00
parent 110f53d5a4
commit 798e59192c
2 changed files with 1 additions and 4 deletions

View File

@ -35,7 +35,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pylint mypy pytest pytest-mock wheel
pip install flake8 pylint mypy pytest pytest-mock pytest-xvfb wheel
pip install -r ./requirements/requirements_${{ matrix.backend }}.txt
- name: Lint with flake8
run: |

View File

@ -116,7 +116,6 @@ class TestFacesDisplay():
f_display.set_display_dimensions(dimensions)
assert f_display._display_dims == dimensions
@pytest.mark.skip(reason="Headless tkinter will error")
@pytest.mark.parametrize("columns, face_size", _PARAMS, ids=_IDS)
def test_update_tk_image(self,
columns: int,
@ -133,8 +132,6 @@ class TestFacesDisplay():
mocker: :class:`pytest_mock.MockerFixture`
Mocker for checking _build_faces_image method called
"""
# TODO find out how we can test this on a headless system
# Launching tk.Tk() will result in an error because a display is not found
f_display = self.get_faces_display_instance(columns, face_size)
f_display._build_faces_image = cast(MagicMock, mocker.MagicMock()) # type:ignore
f_display._get_scale_size = cast(MagicMock, # type:ignore