summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-02-10 18:34:15 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2011-02-11 15:07:46 -0200
commitc167d196107f074d4f814a6bf06729effe0fa80d (patch)
tree063b0332cb610ee1d8158f4d216fffb82a1be17c /tests
parent0374b254dfd955686856d2d13ce5d6b051224130 (diff)
downloadshiboken-c167d196107f074d4f814a6bf06729effe0fa80d.tar.gz
shiboken-c167d196107f074d4f814a6bf06729effe0fa80d.tar.xz
shiboken-c167d196107f074d4f814a6bf06729effe0fa80d.zip
Fix string used in tp_name on inner types.
Reviewer: Lauro Moura <lauro.neto@openbossa.org> Renato Ara├║jo <renato.filho@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/samplebinding/enum_test.py2
-rw-r--r--tests/samplebinding/namespace_test.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/samplebinding/enum_test.py b/tests/samplebinding/enum_test.py
index 22e6b917..4d67fcea 100644
--- a/tests/samplebinding/enum_test.py
+++ b/tests/samplebinding/enum_test.py
@@ -106,7 +106,7 @@ class MyEvent(Event):
class OutOfBoundsTest(unittest.TestCase):
def testValue(self):
e = MyEvent()
- self.assertEqual(repr(e.eventType()), '<enum-item EventType.#out of bounds# (999)>')
+ self.assertEqual(repr(e.eventType()), '<enum-item sample.Event.EventType.#out of bounds# (999)>')
class EnumOverloadTest(unittest.TestCase):
'''Test case for overloads involving enums'''
diff --git a/tests/samplebinding/namespace_test.py b/tests/samplebinding/namespace_test.py
index 29633f38..20637cae 100644
--- a/tests/samplebinding/namespace_test.py
+++ b/tests/samplebinding/namespace_test.py
@@ -40,5 +40,10 @@ class TestClassesUnderNamespace(unittest.TestCase):
res = SampleNamespace.ImInsideANamespace(2, 2)
self.assertEquals(res, 4)
+ def testTpNames(self):
+ self.assertEquals(str(SampleNamespace.SomeClass), "<type 'sample.SampleNamespace.SomeClass'>")
+ self.assertEquals(str(SampleNamespace.SomeClass.SomeInnerClass.OkThisIsRecursiveEnough), "<type 'sample.SampleNamespace.SomeClass.SomeInnerClass.OkThisIsRecursiveEnough'>")
+ self.assertEquals(str(SampleNamespace.SomeClass.SomeInnerClass.OkThisIsRecursiveEnough.NiceEnum), "<type 'sample.SampleNamespace.SomeClass.SomeInnerClass.OkThisIsRecursiveEnough.NiceEnum'>")
+
if __name__ == '__main__':
unittest.main()