diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-07-05 15:38:53 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:15:27 -0300 |
commit | 2452be71838a0ba60ec899c6f4ff8b52325adffb (patch) | |
tree | b6d4f1b1149c3d83a66e2f050c5aa8a7402d5a03 /tests/samplebinding | |
parent | 219ee31ce4cf9c45b9a53cd267df3e8e7b53b0f2 (diff) |
Created unit test for bug #886.
This test check if a enum inside of a namespace which is not exported to
python, work proper.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/samplebinding')
-rw-r--r-- | tests/samplebinding/namespace_test.py | 5 | ||||
-rw-r--r-- | tests/samplebinding/typesystem_sample.xml | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/samplebinding/namespace_test.py b/tests/samplebinding/namespace_test.py index 20637cae7..703333e0f 100644 --- a/tests/samplebinding/namespace_test.py +++ b/tests/samplebinding/namespace_test.py @@ -29,6 +29,11 @@ import unittest from sample import * +class TestEnumUnderNamespace(unittest.TestCase): + def testInvisibleNamespace(self): + o1 = EnumOnNamespace.Option1 + self.assertEquals(o1, 1) + class TestClassesUnderNamespace(unittest.TestCase): def testIt(self): c1 = SampleNamespace.SomeClass() diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml index d99ee0fbc..d4cca8842 100644 --- a/tests/samplebinding/typesystem_sample.xml +++ b/tests/samplebinding/typesystem_sample.xml @@ -91,6 +91,10 @@ <enum-type identified-by-value="AnonymousGlobalEnum_Value0"/> + <namespace-type name="Invisible" generate="no"> + <enum-type name="EnumOnNamespace" /> + </namespace-type> + <namespace-type name="SampleNamespace"> <enum-type name="Option"/> <enum-type name="InValue"/> |