[Checkins] SVN: BTrees/branches/py3k/ Coverage.

Tres Seaver cvs-admin at zope.org
Wed Dec 12 14:40:49 UTC 2012


Log message for revision 128603:
  Coverage.

Changed:
  _U  BTrees/branches/py3k/
  U   BTrees/branches/py3k/BTrees/tests/test__base.py

-=-
Modified: BTrees/branches/py3k/BTrees/tests/test__base.py
===================================================================
--- BTrees/branches/py3k/BTrees/tests/test__base.py	2012-12-12 14:40:47 UTC (rev 128602)
+++ BTrees/branches/py3k/BTrees/tests/test__base.py	2012-12-12 14:40:49 UTC (rev 128603)
@@ -2634,6 +2634,17 @@
         rhs = self._makeSet('a', 'b', 'c')
         self.assertRaises(TypeError, self._callFUT, lhs.__class__, lhs, rhs)
 
+    def test_lhs_mapping_wo_MERGE_DEFAULT_rhs_set(self):
+        class _MappingWoDefault(dict):
+            def MERGE(self, v1, w1, v2, w2):
+                return (v1 * w1) + (v2 * w2)
+            def MERGE_WEIGHT(self, v, w):
+                return v
+        lhs = _MappingWoDefault({'a': 13, 'b': 12, 'c': 11})
+        lhs._mapping_type = _MappingWoDefault
+        rhs = self._makeSet('a', 'b', 'c')
+        self.assertRaises(TypeError, self._callFUT, lhs.__class__, lhs, rhs)
+
     def test_lhs_set_wo_MERGE_DEFAULT_rhs_mapping(self):
         lhs = self._makeSet('a', 'd')
         lhs.MERGE = lambda v1, w1, v2, w2: (v1 * w1) + (v2 * w2)



More information about the checkins mailing list