diff options
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/test_dialog.py | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index ef0b864..48ab487 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -6,7 +6,7 @@ INCLUDES = \ $(GTK_CFLAGS) \ -I$(top_srcdir)/gobject -EXTRA_DIST = $(tests) common.py runtests.py +EXTRA_DIST = $(tests) common.py runtests.py test-thread.h test-unknown.h noinst_LTLIBRARIES = testhelper.la linked_LIBS = testhelper.la @@ -22,6 +22,7 @@ tests = \ conversion.py \ enum.py \ gtype.py \ + test_dialog.py \ test_signal.py \ test_subtype.py \ test_unknown.py diff --git a/tests/test_dialog.py b/tests/test_dialog.py new file mode 100644 index 0000000..74fadb7 --- /dev/null +++ b/tests/test_dialog.py @@ -0,0 +1,15 @@ +import unittest + +from common import gtk + +class DialogTest(unittest.TestCase): + def testDialogAdd(self): + dialog = gtk.MessageDialog() + + # sys.maxint + 1 + response_id = 2147483648 + self.assertRaises(OverflowError, dialog.add_button, "Foo", response_id) + self.assertRaises(OverflowError, dialog.add_buttons, "Foo", response_id) + +if __name__ == '__main__': + unittest.main() |