aboutsummaryrefslogtreecommitdiffstats
path: root/tests/otherbinding/collector_external_operator_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/otherbinding/collector_external_operator_test.py')
-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 28b2d65d7..58a23d2b0 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()