Lines Matching refs:self
10 def test_convert_NRs_to_ranges(self): argument
12 self.assertEqual(len(ranges), 1)
13 self.assertEqual(ranges[0].begin, 1)
14 self.assertEqual(ranges[0].end, 3)
15 self.assertEqual(set(ranges[0].names), {"a", "b"})
18 self.assertEqual(len(ranges), 2)
19 self.assertEqual(ranges[0].begin, 1)
20 self.assertEqual(ranges[0].end, 2)
21 self.assertEqual(set(ranges[0].names), {"a"})
22 self.assertEqual(ranges[1].begin, 3)
23 self.assertEqual(ranges[1].end, 4)
24 self.assertEqual(set(ranges[1].names), {"b"})
26 def test_convert_to_intermediate_bpf(self): argument
29 self.assertEqual(bpf, ['BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 3, {fail}, {allow}), //a|b'])
33 self.assertEqual(bpf, ['BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 3, 1, 0),',
37 def test_convert_ranges_to_bpf(self): argument
40 self.assertEqual(bpf, ['BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 1, 0, 2),',
46 self.assertEqual(bpf, ['BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 1, 0, 4),',
52 def test_convert_bpf_to_output(self): argument
70 self.assertEqual(output, expected_output)