Fix tests with gtk4
This commit is contained in:
parent
9da8600141
commit
17979de747
29
0001-Fix-tests-when-no-GTK3.patch
Normal file
29
0001-Fix-tests-when-no-GTK3.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 6f5a15e4c1a466dcc17bb2d64ef28842c4f7a000 Mon Sep 17 00:00:00 2001
|
||||
From: Arjan Molenaar <gaphor@gmail.com>
|
||||
Date: Sun, 17 Sep 2023 22:39:29 +0200
|
||||
Subject: [PATCH] Fix tests when no GTK3 is installed
|
||||
|
||||
The Atk module was not used, yet imported. Atk is not a GTK 4 module.
|
||||
---
|
||||
tests/test_atoms.py | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_atoms.py b/tests/test_atoms.py
|
||||
index a74db38ce..febff78c1 100644
|
||||
--- a/tests/test_atoms.py
|
||||
+++ b/tests/test_atoms.py
|
||||
@@ -2,10 +2,9 @@ import os
|
||||
import unittest
|
||||
|
||||
try:
|
||||
- from gi.repository import Gtk, Atk, Gdk
|
||||
+ from gi.repository import Gtk, Gdk
|
||||
except ImportError:
|
||||
Gdk = None
|
||||
- Atk = None
|
||||
Gtk = None
|
||||
|
||||
from .helper import capture_glib_deprecation_warnings
|
||||
--
|
||||
GitLab
|
||||
|
||||
@ -11,6 +11,8 @@ Summary: Python bindings for GObject Introspection
|
||||
License: LGPL-2.1-or-later
|
||||
URL: https://wiki.gnome.org/Projects/PyGObject
|
||||
Source0: https://download.gnome.org/sources/pygobject/3.46/pygobject-%{version}.tar.xz
|
||||
# gtk4 no longer uses atk
|
||||
Patch0: 0001-Fix-tests-when-no-GTK3.patch
|
||||
|
||||
BuildRequires: pkgconfig(cairo-gobject)
|
||||
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
|
||||
@ -84,6 +86,7 @@ This package contains files required to embed PyGObject
|
||||
%meson_install
|
||||
|
||||
%check
|
||||
export TEST_GTK_VERSION=4.0
|
||||
%{shrink:xvfb-run -s "-screen 0 1600x1200x24" %meson_test --timeout-multiplier=5}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user