Example #1
0
 def testInvalidatesEmpty(self):
     """
     The list of titles invalidated by an earlier title that didn't
     invalidate anything must be empty.
     """
     rsf = ReadSetFilter(0.5)
     self.assertEqual([], rsf.invalidates("title1"))
Example #2
0
 def testInvalidatesEmpty(self):
     """
     The list of titles invalidated by an earlier title that didn't
     invalidate anything must be empty.
     """
     rsf = ReadSetFilter(0.5)
     self.assertEqual([], rsf.invalidates('title1'))
Example #3
0
 def testInvalidates(self):
     """
     It must be possible to retrieve the list of titles that were
     invalidated by an earlier title's read set.
     """
     rsf = ReadSetFilter(0.5)
     rsf.accept("title1", self.makeTitleAlignments(0))
     rsf.accept("title2", self.makeTitleAlignments(0))
     rsf.accept("title3", self.makeTitleAlignments(1))
     rsf.accept("title4", self.makeTitleAlignments(0))
     self.assertEqual(["title2", "title4"], rsf.invalidates("title1"))
Example #4
0
 def testInvalidates(self):
     """
     It must be possible to retrieve the list of titles that were
     invalidated by an earlier title's read set.
     """
     rsf = ReadSetFilter(0.5)
     rsf.accept('title1', self.makeTitleAlignments(0))
     rsf.accept('title2', self.makeTitleAlignments(0))
     rsf.accept('title3', self.makeTitleAlignments(1))
     rsf.accept('title4', self.makeTitleAlignments(0))
     self.assertEqual(['title2', 'title4'], rsf.invalidates('title1'))