18 from .tags
import TagPatterns
19 from .namepatterns
import SuiteNamePatterns, TestNamePatterns
20 from .visitor
import SuiteVisitor
25 def __init__(self, preserve_direct_children=False):
30 suite.suites = [s
for s
in suite.suites
if s.test_count]
39 class Filter(EmptySuiteRemover):
41 def __init__(self, include_suites=None, include_tests=None,
42 include_tags=None, exclude_tags=None):
66 if items
is None or isinstance(items, pattern_class):
68 return pattern_class(items)
73 if hasattr(suite,
'starttime'):
74 suite.starttime = suite.endtime =
None
83 return bool(suite.suites)
95 return [t
for t
in suite.tests
if filter(t)]
def visit_test(self, test)
Implements traversing through tests.
def visit_keyword(self, kw)
Implements traversing through keywords.
def __init__(self, preserve_direct_children=False)
def end_suite(self, suite)
Called when a suite ends.
def _filter_by_suite_name(self, suite)
def _filter(self, suite, filter)
def include_suites(self, suites)
def start_suite(self, suite)
Called when a suite starts.
def __init__(self, include_suites=None, include_tests=None, include_tags=None, exclude_tags=None)
def include_tests(self, tests)
def include_tags(self, tags)
def _included_by_tags(self, test)
def exclude_tags(self, tags)
def _not_excluded_by_tags(self, test)
def _patterns_or_none(self, items, pattern_class)
def _included_by_test_name(self, test)
Interface to ease traversing through a test suite structure.