diff options
| -rw-r--r-- | .github/workflows/python-app.yml | 40 | ||||
| -rw-r--r-- | tests/test_text_comp.py | 2 |
2 files changed, 42 insertions, 0 deletions
diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..fefb727 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies and run tests with a single version of Python +# +# For more information see: +# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python +# +# For information on using pytest-qt in GitHub Actions see: +# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd + +name: Python application + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + env: + DISPLAY: ':99.0' + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.12 + uses: actions/setup-python@v3 + with: + python-version: "3.12" + - name: Install system dependencies + run: | + sudo apt install -y ffmpeg libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils libgl1 libegl1 libdbus-1-3 libxcb-cursor0 fonts-noto-core + - name: Install Python dependencies + run: | + pip install . pytest pytest-qt pytest-xvfb + - name: Test with pytest + run: | + python3 -m pytest -v
\ No newline at end of file diff --git a/tests/test_text_comp.py b/tests/test_text_comp.py index 3bc0be6..23dd1fd 100644 --- a/tests/test_text_comp.py +++ b/tests/test_text_comp.py @@ -1,4 +1,5 @@ from avp.command import Command +from PyQt6.QtGui import QFont from pytestqt import qtbot from pytest import fixture from . import audioData, MockSignal, imageDataSum @@ -18,6 +19,7 @@ def test_comp_text_renderFrame_resize(coreWithTextComp): comp.parent.settings.setValue("outputWidth", 1920) comp.parent.settings.setValue("outputHeight", 1080) comp.parent.core.updateComponent(0) + comp.titleFont = QFont("Noto Sans") image = comp.frameRender(0) assert imageDataSum(image) == 2957069 |
