diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:46:23 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:46:27 +0900 |
commit | 392945d666d2cfb31a844826a72b1eb65a52546f (patch) | |
tree | a21354051734cbace4e92d6b10c8fa8cd2721dda /tests/test_source.py | |
parent | 4723e0bb24cc41607e5af3bb7036855fa767df0b (diff) | |
download | pygobject2-392945d666d2cfb31a844826a72b1eb65a52546f.tar.gz pygobject2-392945d666d2cfb31a844826a72b1eb65a52546f.tar.bz2 pygobject2-392945d666d2cfb31a844826a72b1eb65a52546f.zip |
Imported Upstream version 3.25.1
Change-Id: I31412b37aa390505e71295f3a2c2e3cf2ba88b41
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'tests/test_source.py')
-rw-r--r-- | tests/test_source.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/test_source.py b/tests/test_source.py index f13ab6b..866826e 100644 --- a/tests/test_source.py +++ b/tests/test_source.py @@ -1,5 +1,6 @@ # -*- Mode: Python -*- +import sys import gc import unittest import warnings @@ -191,6 +192,7 @@ class TestSource(unittest.TestCase): GLib.Timeout(20) GLib.Idle() + @unittest.skipIf(sys.platform == "darwin", "hangs") def test_finalize(self): self.dispatched = False self.finalized = False @@ -281,6 +283,7 @@ class TestSource(unittest.TestCase): self.assertEqual(source.kwarg, 2) +@unittest.skipIf(sys.platform == "darwin", "hangs") class TestUserData(unittest.TestCase): def test_idle_no_data(self): ml = GLib.MainLoop() @@ -297,7 +300,7 @@ class TestUserData(unittest.TestCase): def cb(): ml.quit() - id = GLib.timeout_add(50, cb) + id = GLib.timeout_add(1, cb) self.assertEqual(ml.get_context().find_source_by_id(id).priority, GLib.PRIORITY_DEFAULT) ml.run() @@ -337,7 +340,7 @@ class TestUserData(unittest.TestCase): data['called'] = True ml.quit() data = {} - id = GLib.timeout_add(50, cb, data) + id = GLib.timeout_add(1, cb, data) self.assertEqual(ml.get_context().find_source_by_id(id).priority, GLib.PRIORITY_DEFAULT) ml.run() @@ -351,7 +354,7 @@ class TestUserData(unittest.TestCase): data['data2'] = data2 ml.quit() data = {} - id = GLib.timeout_add(50, cb, data, 'hello') + id = GLib.timeout_add(1, cb, data, 'hello') self.assertEqual(ml.get_context().find_source_by_id(id).priority, GLib.PRIORITY_DEFAULT) ml.run() @@ -373,7 +376,7 @@ class TestUserData(unittest.TestCase): def cb(): ml.quit() - id = GLib.timeout_add(50, cb, priority=GLib.PRIORITY_HIGH) + id = GLib.timeout_add(1, cb, priority=GLib.PRIORITY_HIGH) self.assertEqual(ml.get_context().find_source_by_id(id).priority, GLib.PRIORITY_HIGH) ml.run() @@ -398,7 +401,7 @@ class TestUserData(unittest.TestCase): data['called'] = True ml.quit() data = {} - id = GLib.timeout_add(50, cb, data, priority=GLib.PRIORITY_HIGH) + id = GLib.timeout_add(1, cb, data, priority=GLib.PRIORITY_HIGH) self.assertEqual(ml.get_context().find_source_by_id(id).priority, GLib.PRIORITY_HIGH) ml.run() |