示例#1
0
 def test_and_and_not(self):
     self._test(Filter(exclude_tags=['t1ANDs31']), ['t2', 't3'], ['t1'])
     self._test(Filter(exclude_tags=['?1ANDs*2ANDx']), ['t1', 't2', 't3'],
                [])
     self._test(Filter(exclude_tags=['t1ANDs*NOTx']), ['t2', 't3'], ['t1'])
     self._test(Filter(exclude_tags=['t1AND?1NOTs*ANDx']), ['t2', 't3'],
                ['t1'])
示例#2
0
 def test_with_other_filters(self):
     self._test(Filter(include_suites=['s21'], include_tests=['t1']),
                ['t1'], [])
     self._test(Filter(include_suites=['s22'], include_tags=['t*']), [],
                ['t1'])
     self._test(Filter(include_suites=['s21', 's22'], exclude_tags=['t?']),
                ['t3'], [])
示例#3
0
 def test_constant(self):
     self._test(Filter(include_tests=['t1']), ['t1'], ['t1'])
     self._test(Filter(include_tests=['t2', 'xxx']), ['t2'], [])
示例#4
0
 def test_no_filtering(self):
     self._test(Filter(), ['t1', 't2', 't3'], ['t1'])
     self._test(Filter(include_tests=[]), ['t1', 't2', 't3'], ['t1'])
示例#5
0
 def test_pattern(self):
     self._test(Filter(exclude_tags=['t*']), ['t3'], [])
     self._test(Filter(exclude_tags=['xxx', '?2', 's3*']), ['t3'], ['t1'])
示例#6
0
 def test_constant(self):
     self._test(Filter(exclude_tags=['t1']), ['t2', 't3'], [])
示例#7
0
 def test_normalization(self):
     self._test(Filter(include_tags=['T 1', '_T_2_']), ['t1', 't2'], ['t1'])
示例#8
0
 def test_constant(self):
     self._test(Filter(include_tags=['t1']), ['t1'], ['t1'])
示例#9
0
 def test_longname(self):
     self._test(Filter(include_tests=['s1.s21.s31.t3', 's1.s?2.*']), ['t3'], ['t1'])
示例#10
0
 def test_pattern(self):
     self._test(Filter(include_tests=['t*']), ['t1', 't2', 't3'], ['t1'])
     self._test(Filter(include_tests=['xxx', '*2', '?3']), ['t2', 't3'], [])
示例#11
0
 def test_empty_list_matches_none(self):
     self._test(Filter(include_tests=[]), [], [])
示例#12
0
 def test_empty_list_matches_none(self):
     self._test(Filter(exclude_tags=[]), ['t1', 't2', 't3'], ['t1'])
示例#13
0
 def test_no_filtering(self):
     self._test(Filter(), ['t1', 't2', 't3'], ['t1'])
     self._test(Filter(exclude_tags=None), ['t1', 't2', 't3'], ['t1'])
示例#14
0
 def test_remove_branch(self):
     self._test(Filter(include_suites='s22'), [], ['t1'])
     assert_equal(list(self.s1.suites), [self.s22])
示例#15
0
 def test_constant(self):
     self._test(Filter(include_suites=['s22']), [], ['t1'])
     self._test(Filter(include_suites=['s1', 'xxx']), ['t1', 't2', 't3'], ['t1'])
示例#16
0
 def test_remove_all(self):
     self._test(Filter(include_tests='none'), [], [])
     assert_equal(list(self.s1.suites), [])
示例#17
0
 def test_string(self):
     self._test(Filter(include_suites='s22'), [], ['t1'])
示例#18
0
 def test_pattern(self):
     self._test(Filter(include_tags=['t*']), ['t1', 't2'], ['t1'])
     self._test(Filter(include_tags=['xxx', '?2', 's*2']), ['t2'], ['t1'])
示例#19
0
 def test_pattern(self):
     self._test(Filter(include_suites=['s3?']), ['t1', 't2', 't3'], [])
示例#20
0
 def test_no_match(self):
     self._test(Filter(exclude_tags=['no', 'match']), ['t1', 't2', 't3'], ['t1'])
示例#21
0
 def test_reuse_filter(self):
     filter = Filter(include_suites=['s22'])
     self._test(filter, [], ['t1'])
     self._test(filter, [], ['t1'])
示例#22
0
 def test_string(self):
     self._test(Filter(exclude_tags='t1'), ['t2', 't3'], [])
示例#23
0
 def test_parent_name(self):
     self._test(Filter(include_suites=['s1.s21.s31']), ['t1', 't2', 't3'], [])
     self._test(Filter(include_suites=['s2?.s31']), ['t1', 't2', 't3'], [])
     self._test(Filter(include_suites=['*.s22']), [], ['t1'])
     self._test(Filter(include_suites=['xxx.s22']), [], [])
示例#24
0
 def test_normalization(self):
     self._test(Filter(exclude_tags=['T 1', '_T_2_']), ['t3'], [])
示例#25
0
 def test_normalization(self):
     self._test(Filter(include_suites=['_S 2 2_', 'xxx']), [], ['t1'])
示例#26
0
 def test_no_match(self):
     self._test(Filter(include_tests=['no match']), [], [])
示例#27
0
 def test_remove_empty_leaf_suite(self):
     self._test(Filter(include_tags='t2'), ['t2'], [])
     assert_equal(list(self.s1.suites), [self.s21])
示例#28
0
 def test_string(self):
     self._test(Filter(include_tests='t1'), ['t1'], ['t1'])
示例#29
0
 def test_no_filtering(self):
     self._test(Filter(), ['t1', 't2', 't3'], ['t1'])
     self._test(Filter(include_suites=None), ['t1', 't2', 't3'], ['t1'])