mirror of
https://github.com/zebrajr/faceswap.git
synced 2025-12-06 00:20:09 +01:00
unit test updates
- Add XVFB (virtual display) - Re-activate viewer gui test
This commit is contained in:
parent
110f53d5a4
commit
798e59192c
2
.github/workflows/pytest.yml
vendored
2
.github/workflows/pytest.yml
vendored
|
|
@ -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: |
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user