Example #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'])
Example #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'], [])
Example #3
0
 def test_constant(self):
     self._test(Filter(include_tests=['t1']), ['t1'], ['t1'])
     self._test(Filter(include_tests=['t2', 'xxx']), ['t2'], [])
Example #4
0
 def test_no_filtering(self):
     self._test(Filter(), ['t1', 't2', 't3'], ['t1'])
     self._test(Filter(include_tests=[]), ['t1', 't2', 't3'], ['t1'])
Example #5
0
 def test_pattern(self):
     self._test(Filter(exclude_tags=['t*']), ['t3'], [])
     self._test(Filter(exclude_tags=['xxx', '?2', 's3*']), ['t3'], ['t1'])
Example #6
0
 def test_constant(self):
     self._test(Filter(exclude_tags=['t1']), ['t2', 't3'], [])
Example #7
0
 def test_normalization(self):
     self._test(Filter(include_tags=['T 1', '_T_2_']), ['t1', 't2'], ['t1'])
Example #8
0
 def test_constant(self):
     self._test(Filter(include_tags=['t1']), ['t1'], ['t1'])
Example #9
0
 def test_longname(self):
     self._test(Filter(include_tests=['s1.s21.s31.t3', 's1.s?2.*']), ['t3'], ['t1'])
Example #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'], [])
Example #11
0
 def test_empty_list_matches_none(self):
     self._test(Filter(include_tests=[]), [], [])
Example #12
0
 def test_empty_list_matches_none(self):
     self._test(Filter(exclude_tags=[]), ['t1', 't2', 't3'], ['t1'])
Example #13
0
 def test_no_filtering(self):
     self._test(Filter(), ['t1', 't2', 't3'], ['t1'])
     self._test(Filter(exclude_tags=None), ['t1', 't2', 't3'], ['t1'])
Example #14
0
 def test_remove_branch(self):
     self._test(Filter(include_suites='s22'), [], ['t1'])
     assert_equal(list(self.s1.suites), [self.s22])
Example #15
0
 def test_constant(self):
     self._test(Filter(include_suites=['s22']), [], ['t1'])
     self._test(Filter(include_suites=['s1', 'xxx']), ['t1', 't2', 't3'], ['t1'])
Example #16
0
 def test_remove_all(self):
     self._test(Filter(include_tests='none'), [], [])
     assert_equal(list(self.s1.suites), [])
Example #17
0
 def test_string(self):
     self._test(Filter(include_suites='s22'), [], ['t1'])
Example #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'])
Example #19
0
 def test_pattern(self):
     self._test(Filter(include_suites=['s3?']), ['t1', 't2', 't3'], [])
Example #20
0
 def test_no_match(self):
     self._test(Filter(exclude_tags=['no', 'match']), ['t1', 't2', 't3'], ['t1'])
Example #21
0
 def test_reuse_filter(self):
     filter = Filter(include_suites=['s22'])
     self._test(filter, [], ['t1'])
     self._test(filter, [], ['t1'])
Example #22
0
 def test_string(self):
     self._test(Filter(exclude_tags='t1'), ['t2', 't3'], [])
Example #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']), [], [])
Example #24
0
 def test_normalization(self):
     self._test(Filter(exclude_tags=['T 1', '_T_2_']), ['t3'], [])
Example #25
0
 def test_normalization(self):
     self._test(Filter(include_suites=['_S 2 2_', 'xxx']), [], ['t1'])
Example #26
0
 def test_no_match(self):
     self._test(Filter(include_tests=['no match']), [], [])
Example #27
0
 def test_remove_empty_leaf_suite(self):
     self._test(Filter(include_tags='t2'), ['t2'], [])
     assert_equal(list(self.s1.suites), [self.s21])
Example #28
0
 def test_string(self):
     self._test(Filter(include_tests='t1'), ['t1'], ['t1'])
Example #29
0
 def test_no_filtering(self):
     self._test(Filter(), ['t1', 't2', 't3'], ['t1'])
     self._test(Filter(include_suites=None), ['t1', 't2', 't3'], ['t1'])