diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2019-01-19 11:31:41 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2019-01-19 11:34:32 +0100 |
commit | 6c69fc7b582ec1fd3faef4de3fade9a0cb7f8c05 (patch) | |
tree | 5a524acbccc9a1bdac829cb383768fa0127ea2be /tests/test_gi.py | |
parent | 48f80f8b763d84294c73f428bf7ede39cef57027 (diff) | |
download | pygobject-6c69fc7b582ec1fd3faef4de3fade9a0cb7f8c05.tar.gz |
basic: allow None for boolean parameters
It already allows everything which can be passed to bool() except None.
I don't see a good reason for that so allow None as well.
Diffstat (limited to 'tests/test_gi.py')
-rw-r--r-- | tests/test_gi.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_gi.py b/tests/test_gi.py index 2b6f3c0a..61ad4f18 100644 --- a/tests/test_gi.py +++ b/tests/test_gi.py @@ -87,6 +87,11 @@ class TestBoolean(unittest.TestCase): GIMarshallingTests.boolean_in_true(1) GIMarshallingTests.boolean_in_false(0) + def test_boolean_in_other_types(self): + GIMarshallingTests.boolean_in_true([""]) + GIMarshallingTests.boolean_in_false([]) + GIMarshallingTests.boolean_in_false(None) + def test_boolean_out(self): self.assertEqual(True, GIMarshallingTests.boolean_out_true()) self.assertEqual(False, GIMarshallingTests.boolean_out_false()) |