[ibus-cangjie] Skip a unit test

Mathieu Bridon bochecha at fedoraproject.org
Fri Apr 25 07:39:04 UTC 2014


commit 034e550659c1a1291eb3f76cf352a75e5f7327e0
Author: Mathieu Bridon <bochecha at fedoraproject.org>
Date:   Fri Apr 25 15:38:25 2014 +0800

    Skip a unit test
    
    https://github.com/Cangjians/ibus-cangjie/issues/56

 ibus-cangjie-2.2-Skip-a-unit-test.patch |   31 +++++++++++++++++++++++++++++++
 ibus-cangjie.spec                       |    5 +++++
 2 files changed, 36 insertions(+), 0 deletions(-)
---
diff --git a/ibus-cangjie-2.2-Skip-a-unit-test.patch b/ibus-cangjie-2.2-Skip-a-unit-test.patch
new file mode 100644
index 0000000..8c13e48
--- /dev/null
+++ b/ibus-cangjie-2.2-Skip-a-unit-test.patch
@@ -0,0 +1,31 @@
+From 6963f9473a640cb6736a1642a955b224491e4d35 Mon Sep 17 00:00:00 2001
+From: Mathieu Bridon <bochecha at fedoraproject.org>
+Date: Fri, 25 Apr 2014 15:29:16 +0800
+Subject: [PATCH] Skip a unit test
+
+This test can only be run in a graphical session anyway.
+
+However, it should automatically skip itself in non-graphical
+environments.
+
+This fails though, so let's just explicitly skip the test for now in
+Fedora builds.
+---
+ tests/test_prefs.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/test_prefs.py b/tests/test_prefs.py
+index d1bb438..e568939 100644
+--- a/tests/test_prefs.py
++++ b/tests/test_prefs.py
+@@ -37,6 +37,7 @@ class PrefsTestCase(unittest.TestCase):
+         except ET.ParseError as e:
+             raise AssertionError(e)
+ 
++    @unittest.skip("Importing Gtk doesn't raise a RuntimeError on recent Fedora")
+     def test_ui_file_is_valid_gtk_builder(self):
+         try:
+             from gi.repository import Gtk
+-- 
+1.9.0
+
diff --git a/ibus-cangjie.spec b/ibus-cangjie.spec
index 2686580..0283187 100644
--- a/ibus-cangjie.spec
+++ b/ibus-cangjie.spec
@@ -23,6 +23,9 @@ Requires:         python3-canberra
 Requires:         python3-cangjie >= 1.2
 Requires:         python3-gobject
 
+# https://github.com/Cangjians/ibus-cangjie/issues/56
+Patch0:           ibus-cangjie-2.2-Skip-a-unit-test.patch
+
 %description
 IBus engine for users of the Cangjie and Quick input methods.
 
@@ -35,6 +38,8 @@ However, it should work for others as well (e.g to input Simplified Chinese).
 %prep
 %setup -q
 
+%patch0 -p1
+
 
 %build
 %configure


More information about the scm-commits mailing list