diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fda73d039a..74ac29e905 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -195,9 +195,7 @@ jobs: - backend: linux runs-on: ubuntu-latest - pre-command: | - sudo apt-get update -y && sudo apt-get install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config libfuse2 - gsettings set org.gnome.desktop.interface enable-animations false + pre-command: sudo apt-get update -y && sudo apt-get install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config libfuse2 briefcase-run-prefix: 'xvfb-run -a -s "-screen 0 2048x1536x24"' - backend: windows diff --git a/gtk/tests_backend/widgets/base.py b/gtk/tests_backend/widgets/base.py index be5411aeb9..f9a4112bd0 100644 --- a/gtk/tests_backend/widgets/base.py +++ b/gtk/tests_backend/widgets/base.py @@ -1,9 +1,8 @@ import asyncio -import warnings from pytest import skip -from toga_gtk.libs import Gio, Gtk +from toga_gtk.libs import Gtk from .properties import toga_color, toga_font @@ -15,15 +14,9 @@ def __init__(self, widget): self.native = widget._impl.native assert isinstance(self.native, self.native_class) - # Check if GTK UI animations are enabled. - settings = Gio.Settings(schema="org.gnome.desktop.interface") - if settings.get_boolean("enable-animations"): - warnings.warn( - "GTK UI animations are enabled; any tests failures are likely " - "caused by this. Run `gsettings set org.gnome.desktop.interface " - "enable-animations false` to disable animations.", - RuntimeWarning, - ) + # Ensure that the theme isn't using animations for the widget. + settings = Gtk.Settings.get_for_screen(self.native.get_screen()) + settings.set_property("gtk-enable-animations", False) def assert_container(self, container): container_native = container._impl.container