def test_satisfy(self): """Test function satisfy().""" inFN = op.join(self.testDir, "data/test_subset.fa") reads = [] with FastaReader(inFN) as reader: reads = [x for x in reader] rules = SubsetRules(1, 1) # Full-length, non-chimeric obj = ReadsSubsetExtractor("in", "out", rules, True) ans = [ReadAnnotation.fromString(r.name) for r in reads] res = [obj.satisfy(an, rules) for an in ans] expected = [1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1] self.assertTrue(res == expected)