diff options
author | Johan Dahlin <johan@src.gnome.org> | 2006-11-18 15:38:46 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2006-11-18 15:38:46 +0000 |
commit | 1063ecd1a4b51e259ef7ababb14d275a3debd021 (patch) | |
tree | e61399c878880e190e71c98079405c237e032ed5 /tests/test_option.py | |
parent | dd9229fcc0ce1123e20f26804d147030cb268a13 (diff) | |
download | pygobject-1063ecd1a4b51e259ef7ababb14d275a3debd021.tar.gz pygobject-1063ecd1a4b51e259ef7ababb14d275a3debd021.tar.xz pygobject-1063ecd1a4b51e259ef7ababb14d275a3debd021.zip |
Make sure an exception is raised when we pass in invalid arguments to the
* gobject/pygoptiongroup.c (pyg_option_group_dealloc):
* tests/test_option.py (TestOption.testBadConstructor):
Make sure an exception is raised when we pass in invalid arguments
to the optiongroup constructor, add a test. #364576 (Laszlo Pandy)
Diffstat (limited to 'tests/test_option.py')
-rw-r--r-- | tests/test_option.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_option.py b/tests/test_option.py index ace7bdb..84e9305 100644 --- a/tests/test_option.py +++ b/tests/test_option.py @@ -28,7 +28,7 @@ class TestOption(unittest.TestCase): parser.add_option("-t", "--test", help="Unit test option", action="store_false", dest="test", default=True) return parser - + def testOption(self): parser = self.setup_parser() group = self.setup_group() @@ -38,3 +38,6 @@ class TestOption(unittest.TestCase): assert group.values.test assert not parser.values.test assert group.values.unit_file == "test" + + def testBadConstructor(self): + self.assertRaises(TypeError, option.OptionGroup) |