[pygobject] test_overrides: Find local gsettings schema with current glib
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] test_overrides: Find local gsettings schema with current glib
- Date: Thu, 22 Mar 2012 08:59:34 +0000 (UTC)
commit 3b4ae83a0ece8e3aed1de5452e2acd32841e629a
Author: Martin Pitt <martin pitt ubuntu com>
Date: Thu Mar 22 09:58:21 2012 +0100
test_overrides: Find local gsettings schema with current glib
With current glib, gsettings now fails to find the gschemas.compiled during the
tests. Move the setting of $GSETTINGS_SCHEMA_DIR before the module import,
which makes this work again.
tests/test_overrides.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index 0d4a3b1..cec4d77 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -9,6 +9,11 @@ sys.path.insert(0, "../")
from compathelper import _long, _unicode, _bytes
+os.environ['GSETTINGS_BACKEND'] = 'memory'
+# support a separate build tree, so look in build dir first
+os.environ['GSETTINGS_SCHEMA_DIR'] = os.environ.get('TESTS_BUILDDIR',
+ os.path.dirname(__file__))
+
from gi.repository import GLib
from gi.repository import GObject
from gi.repository import Gdk
@@ -1864,10 +1869,6 @@ class TestGtk(unittest.TestCase):
class TestGio(unittest.TestCase):
def setUp(self):
- os.environ['GSETTINGS_BACKEND'] = 'memory'
- # support a separate build tree, so look in build dir first
- os.environ['GSETTINGS_SCHEMA_DIR'] = os.environ.get('TESTS_BUILDDIR',
- os.path.dirname(__file__))
self.settings = Gio.Settings('org.gnome.test')
# we change the values in the tests, so set them to predictable start
# value
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]