[pygobject] Add null_gerror_callback unit test
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Add null_gerror_callback unit test
- Date: Mon, 6 Feb 2012 08:41:55 +0000 (UTC)
commit 4ea37c606f67df843788261b2c8acd6bac4c1e0c
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Feb 5 18:51:53 2012 +0100
Add null_gerror_callback unit test
This models the case where the callback is successful and does not set
an error.
https://bugzilla.gnome.org/show_bug.cgi?id=669415
tests/test_everything.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_everything.py b/tests/test_everything.py
index 02447fa..82edfcf 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -362,6 +362,15 @@ class TestCallbacks(unittest.TestCase):
Everything.test_gerror_callback(callback)
self.assertTrue(TestCallbacks.called)
+ def test_callback_null_gerror(self):
+ def callback(error):
+ self.assertEqual(error, None)
+ TestCallbacks.called = True
+
+ TestCallbacks.called = False
+ Everything.test_null_gerror_callback(callback)
+ self.assertTrue(TestCallbacks.called)
+
def test_callback_owned_gerror(self):
def callback(error):
self.assertEqual(error.message, 'regression test owned error')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]