summaryrefslogtreecommitdiff
path: root/tests/test_atoms.py
diff options
context:
space:
mode:
authorChristoph Reiter <creiter@src.gnome.org>2017-04-02 13:17:36 +0200
committerChristoph Reiter <creiter@src.gnome.org>2017-04-02 13:17:36 +0200
commitc3159accf3faa2bd804ac22ec7ac93e62b158a3e (patch)
treed010df4ad7184e3ed0712a0848ee92ccd97b5b7a /tests/test_atoms.py
parentc89fa35814103a4ceefece8e305af4f9e0dd6a37 (diff)
downloadpygobject-c3159accf3faa2bd804ac22ec7ac93e62b158a3e.tar.gz
tests: always call require_version; add TEST_GTK_VERSION env var
Set the versions in runtests.py instead of repeating it in every test module. Add a new TEST_GTK_VERSION env var which defaults to "3.0". Allows to run tests with gtk4 using "make check TEST_GTK_VERSION=4.0"
Diffstat (limited to 'tests/test_atoms.py')
-rw-r--r--tests/test_atoms.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_atoms.py b/tests/test_atoms.py
index e6c8aba1..02b0a1de 100644
--- a/tests/test_atoms.py
+++ b/tests/test_atoms.py
@@ -3,12 +3,11 @@ import sys
import unittest
try:
- import gi
- gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Atk, Gdk
- (Atk, Gdk) # pyflakes
-except (ValueError, ImportError):
+except ImportError:
Gdk = None
+ Atk = None
+ Gtk = None
from helper import capture_glib_deprecation_warnings