From 0b136468c8905a27a2500842de36b31a25ca0fad Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Mon, 9 Dec 2019 13:37:18 +0000 Subject: [PATCH] Entry test: Add Terminal input purpose --- tests/entry.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/entry.py b/tests/entry.py index e7f813fe..235a7931 100644 --- a/tests/entry.py +++ b/tests/entry.py @@ -6,6 +6,12 @@ gi.require_version('Gtk', '3.0') from gi.repository import Gtk +try: + terminal = [("Terminal", Gtk.InputPurpose.TERMINAL)] +except AttributeError: + print("Terminal purpose not available on this GTK version", file=sys.stderr) + terminal = [] + class App(Gtk.Application): purposes = [ @@ -18,8 +24,8 @@ class App(Gtk.Application): ("E-mail", Gtk.InputPurpose.EMAIL), ("Name", Gtk.InputPurpose.NAME), ("Password", Gtk.InputPurpose.PASSWORD), - ("PIN", Gtk.InputPurpose.PIN) - ] + ("PIN", Gtk.InputPurpose.PIN), + ] + terminal def do_activate(self): w = Gtk.ApplicationWindow(application=self)