summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-03-30 14:37:23 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-03-31 11:26:40 -0300
commit72647558891dff9d80aa9013f3bd6a82fe53753e (patch)
tree57e19e267ea44271c86dfc275e16b62ecec879b4
parent60b8cc95b2ef28d7e253b813f0db0d31cb8ae845 (diff)
downloadshiboken-72647558891dff9d80aa9013f3bd6a82fe53753e.tar.gz
shiboken-72647558891dff9d80aa9013f3bd6a82fe53753e.tar.xz
shiboken-72647558891dff9d80aa9013f3bd6a82fe53753e.zip
Extended extended reverse shift operator test.
Just added the basic case of "Collector << ObjectType".
-rw-r--r--tests/otherbinding/collector_external_operator_test.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/otherbinding/collector_external_operator_test.py b/tests/otherbinding/collector_external_operator_test.py
index 28b2d65d..58a23d2b 100644
--- a/tests/otherbinding/collector_external_operator_test.py
+++ b/tests/otherbinding/collector_external_operator_test.py
@@ -26,21 +26,27 @@
'''Test cases for Collector shift operators defined in other modules.'''
-import sys
import unittest
-from sample import Collector
+from sample import Collector, ObjectType
from other import OtherObjectType
class CollectorOtherObjectType(unittest.TestCase):
'''Test cases for Collector << OtherObjectType'''
+ def testLShiftWithExpectedType(self):
+ '''Collector << ObjectType # libsample << operator'''
+ collector = Collector()
+ obj = ObjectType()
+ collector << obj
+ self.assertEqual(collector.items()[0], obj.identifier())
+
def testOtherReversal(self):
'''Collector << OtherObjectType # libother << operator'''
collector = Collector()
obj = OtherObjectType()
collector << obj
- self.assertEqual(collector.items()[0], obj.identifier()*2)
+ self.assertEqual(collector.items()[0], obj.identifier() * 2)
if __name__ == '__main__':
unittest.main()