diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-02-16 17:43:00 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-02-16 17:43:00 +0100 |
commit | c56b4510649dae58519681c1a53aed85d598139e (patch) | |
tree | 26ca827c3bee994425d2a53f7adb93db1a8cfcc3 /tests/test_everything.py | |
parent | 9c3cb6b49c33f53d637e80aad68a67e89d0eb944 (diff) | |
download | pygobject-c56b4510649dae58519681c1a53aed85d598139e.tar.gz |
tests: add tests for boxed in GLists. See !24
Diffstat (limited to 'tests/test_everything.py')
-rw-r--r-- | tests/test_everything.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_everything.py b/tests/test_everything.py index ee852098..c8694add 100644 --- a/tests/test_everything.py +++ b/tests/test_everything.py @@ -1166,6 +1166,22 @@ class TestBoxed(unittest.TestCase): assert arr[0].refcount == 2 assert arr[1].refcount == 2 + def test_glist_boxed_none_return(self): + assert len(Everything.test_glist_boxed_none_return(0)) == 0 + + list_ = Everything.test_glist_boxed_none_return(2) + assert len(list_) == 2 + assert list_[0].refcount == 2 + assert list_[1].refcount == 2 + + def test_glist_boxed_full_return(self): + assert len(Everything.test_glist_boxed_full_return(0)) == 0 + + list_ = Everything.test_glist_boxed_full_return(2) + assert len(list_) == 2 + assert list_[0].refcount == 1 + assert list_[1].refcount == 1 + class TestTortureProfile(unittest.TestCase): def test_torture_profile(self): |