diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:45:53 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:45:57 +0900 |
commit | 59e9ea558c6c312e7544da5dcb99ddde29f08aef (patch) | |
tree | 6c931f396cdce5ddda5d9bcad03d52743dcff713 /tests/test_gi.py | |
parent | 21d2cf757d6646ab430406c5406b15d753474e98 (diff) | |
download | pygobject2-59e9ea558c6c312e7544da5dcb99ddde29f08aef.tar.gz pygobject2-59e9ea558c6c312e7544da5dcb99ddde29f08aef.tar.bz2 pygobject2-59e9ea558c6c312e7544da5dcb99ddde29f08aef.zip |
Imported Upstream version 3.21.92
Change-Id: I82aba60917e0d0f191abfa37f1162e93981f165d
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'tests/test_gi.py')
-rw-r--r-- | tests/test_gi.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_gi.py b/tests/test_gi.py index 1fbc216..d0c72b6 100644 --- a/tests/test_gi.py +++ b/tests/test_gi.py @@ -710,6 +710,10 @@ class TestFilename(unittest.TestCase): self.assertEqual(result, True) self.assertEqual(contents, b'hello world!\n\x01\x02') + def test_filename_in_nullable(self): + self.assertTrue(GIMarshallingTests.filename_copy(None) is None) + self.assertRaises(TypeError, GIMarshallingTests.filename_exists, None) + def test_filename_out(self): self.assertRaises(GLib.GError, GLib.Dir.make_tmp, 'test') @@ -1265,6 +1269,17 @@ class TestGHashTable(unittest.TestCase): self.assertEqual({'-1': '1', '0': '0', '1': '1'}, GIMarshallingTests.ghashtable_utf8_full_inout(i)) + def test_ghashtable_enum_none_in(self): + GIMarshallingTests.ghashtable_enum_none_in({1: GIMarshallingTests.ExtraEnum.VALUE1, + 2: GIMarshallingTests.ExtraEnum.VALUE2, + 3: GIMarshallingTests.ExtraEnum.VALUE3}) + + def test_ghashtable_enum_none_return(self): + self.assertEqual({1: GIMarshallingTests.ExtraEnum.VALUE1, + 2: GIMarshallingTests.ExtraEnum.VALUE2, + 3: GIMarshallingTests.ExtraEnum.VALUE3}, + GIMarshallingTests.ghashtable_enum_none_return()) + class TestGValue(unittest.TestCase): |