Repository: labelle-org/labelle (language: python)

Issue:
Add GUI tests
I think this should be a top priority. The GUI keeps breaking because we don't have automatic tests.

Probably we should use https://pytest-qt.readthedocs.io.


Discussion / hints:

Fix patch:
diff --git a/pyproject.toml b/pyproject.toml
index badfab71..2c9d50fa 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -83,6 +83,7 @@ commands =
   pip freeze
   labelle --version
   labelle --help
+  python -c "import labelle.gui.gui; print('GUI import succeeded')"
   labelle --output console "single line"
   labelle --output console_inverted "inverted"
   labelle --output console multiple lines


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index d67ff61c..b2a07643 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -21,6 +21,7 @@ jobs:
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies
       run: |
+        sudo apt-get install -y libegl1
         python -m pip install --upgrade pip
         pip install tox tox-gh-actions
     - name: Test with tox