slight fix to MapUpdateClause context size. Fix MapUpdateClause assignment clause test.
This commit is contained in:
		@@ -334,7 +334,7 @@ class MapUpdateClause(ContainerUpdateClause):
 | 
			
		||||
 | 
			
		||||
    def get_context_size(self):
 | 
			
		||||
        if not self._analyzed: self._analyze()
 | 
			
		||||
        if self.previous is None:
 | 
			
		||||
        if self.previous is None and not self._updates:
 | 
			
		||||
            return 1
 | 
			
		||||
        return len(self._updates or []) * 2
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -235,7 +235,7 @@ class ListUpdateClauseTests(TestCase):
 | 
			
		||||
class MapUpdateTests(TestCase):
 | 
			
		||||
 | 
			
		||||
    def test_update(self):
 | 
			
		||||
        c = MapUpdateClause('s', {3: 0, 5: 6}, {5: 0, 3: 4})
 | 
			
		||||
        c = MapUpdateClause('s', {3: 0, 5: 6}, previous={5: 0, 3: 4})
 | 
			
		||||
        c._analyze()
 | 
			
		||||
        c.set_context_id(0)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user