diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-03-19 14:55:33 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-03-19 15:02:48 -0300 |
commit | dd70b0c75366379f89e0bb46c15638d5f54904ab (patch) | |
tree | ba79a189daadf9cff63eeeef85746bb340b47b9c /tests/samplebinding/hashabletype_test.py | |
parent | 42fd70af65f843853df851657f175351c072ff76 (diff) |
Added a unit test to check the object-type hashability.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
Diffstat (limited to 'tests/samplebinding/hashabletype_test.py')
-rw-r--r-- | tests/samplebinding/hashabletype_test.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/samplebinding/hashabletype_test.py b/tests/samplebinding/hashabletype_test.py index 8c7927851..84f937dc1 100644 --- a/tests/samplebinding/hashabletype_test.py +++ b/tests/samplebinding/hashabletype_test.py @@ -32,12 +32,18 @@ from sample import * class HashableTest(unittest.TestCase): - def testAbstractPureVirtualMethodAvailability(self): + def testStrHash(self): h = {} s = Str("Hi") h[s] = 2 self.assert_(h.get(s), 2) + def testObjectTypeHash(self): + h = {} + o = ObjectType() + h[o] = 2 + self.assert_(h.get(o), 2) + if __name__ == '__main__': unittest.main() |