summaryrefslogtreecommitdiff
path: root/tests/test_gi.py
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:41:54 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:41:58 +0900
commit4bfc3de521c8d93613e5153028da35406609a64f (patch)
tree98175ed0ab42bc56bec3d45d69364a988a00de1f /tests/test_gi.py
parent5a89ec21697bd9e08c9102b2a7b6c60b4652e66c (diff)
downloadpygobject2-4bfc3de521c8d93613e5153028da35406609a64f.tar.gz
pygobject2-4bfc3de521c8d93613e5153028da35406609a64f.tar.bz2
pygobject2-4bfc3de521c8d93613e5153028da35406609a64f.zip
Imported Upstream version 3.13.2
Change-Id: Icce9be2c1bf0568fc95f75ff0a714c017e6171ec Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'tests/test_gi.py')
-rw-r--r--tests/test_gi.py59
1 files changed, 3 insertions, 56 deletions
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 9846440..4a5d510 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -61,9 +61,8 @@ class Sequence(object):
class TestConstant(unittest.TestCase):
-# Blocked by https://bugzilla.gnome.org/show_bug.cgi?id=595773
-# def test_constant_utf8(self):
-# self.assertEqual(CONSTANT_UTF8, GIMarshallingTests.CONSTANT_UTF8)
+ def test_constant_utf8(self):
+ self.assertEqual(CONSTANT_UTF8, GIMarshallingTests.CONSTANT_UTF8)
def test_constant_number(self):
self.assertEqual(CONSTANT_NUMBER, GIMarshallingTests.CONSTANT_NUMBER)
@@ -2009,7 +2008,6 @@ class TestGObject(unittest.TestCase):
GIMarshallingTests.Object.none_inout(GIMarshallingTests.SubObject(int=42))
- @unittest.expectedFailure # https://bugzilla.gnome.org/show_bug.cgi?id=709796
def test_object_full_inout(self):
# Using gimarshallingtests.c from GI versions > 1.38.0 will show this
# test as an "unexpected success" due to reference leak fixes in that file.
@@ -2524,9 +2522,7 @@ class TestOverrides(unittest.TestCase):
# not overridden
self.assertEqual(GIMarshallingTests.SubObject.__module__, 'gi.repository.GIMarshallingTests')
- # FIXME: does not work with TEST_NAMES='test_thread test_gi.TestOverrides',
- # it is importlib._bootstrap then
- #self.assertEqual(GObject.InitiallyUnowned.__module__, 'gi.repository.GObject')
+ self.assertEqual(GObject.InitiallyUnowned.__module__, 'gi.repository.GObject')
class TestDir(unittest.TestCase):
@@ -2554,55 +2550,6 @@ class TestDir(unittest.TestCase):
# self.assertTrue('DoNotImportDummyTests' in list)
-class TestGError(unittest.TestCase):
- def test_array_in_crash(self):
- # Previously there was a bug in invoke, in which C arrays were unwrapped
- # from inside GArrays to be passed to the C function. But when a GError was
- # set, invoke would attempt to free the C array as if it were a GArray.
- # This crash is only for C arrays. It does not happen for C functions which
- # take in GArrays. See https://bugzilla.gnome.org/show_bug.cgi?id=642708
- self.assertRaises(GObject.GError, GIMarshallingTests.gerror_array_in, [1, 2, 3])
-
- def test_out(self):
- # See https://bugzilla.gnome.org/show_bug.cgi?id=666098
- error, debug = GIMarshallingTests.gerror_out()
-
- self.assertIsInstance(error, GObject.GError)
- self.assertEqual(error.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
- self.assertEqual(error.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
- self.assertEqual(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
- self.assertEqual(debug, GIMarshallingTests.CONSTANT_GERROR_DEBUG_MESSAGE)
-
- def test_out_transfer_none(self):
- # See https://bugzilla.gnome.org/show_bug.cgi?id=666098
- error, debug = GIMarshallingTests.gerror_out_transfer_none()
-
- self.assertIsInstance(error, GObject.GError)
- self.assertEqual(error.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
- self.assertEqual(error.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
- self.assertEqual(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
- self.assertEqual(GIMarshallingTests.CONSTANT_GERROR_DEBUG_MESSAGE, debug)
-
- def test_return(self):
- # See https://bugzilla.gnome.org/show_bug.cgi?id=666098
- error = GIMarshallingTests.gerror_return()
-
- self.assertIsInstance(error, GObject.GError)
- self.assertEqual(error.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
- self.assertEqual(error.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
- self.assertEqual(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
-
- def test_exception(self):
- self.assertRaises(GObject.GError, GIMarshallingTests.gerror)
- try:
- GIMarshallingTests.gerror()
- except Exception:
- etype, e = sys.exc_info()[:2]
- self.assertEqual(e.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
- self.assertEqual(e.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
- self.assertEqual(e.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
-
-
class TestParamSpec(unittest.TestCase):
# https://bugzilla.gnome.org/show_bug.cgi?id=682355
@unittest.expectedFailure