11 sys.path.append(os.path.join(os.environ[
'MTT_HOME'],
"pylib/System"))
16 td.config = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation())
17 td.config.optionxform = str
18 td.config.add_section(
'ENV')
19 td.config.add_section(
'LOG')
24 td.config.add_section(
'Reporter:IUDatabase')
25 print(
"--->sections:", td.config.sections())
26 assert td.config.sections()
is not None
27 sections = [
'Reporter:*']
28 print(
"--->to skip:", sections)
29 expsections = td.expandWildCards(sections)
30 assert 'Reporter:IUDatabase' in expsections
31 print(
"--->expanded:", expsections)
35 td.config.add_section(
'Reporter:IUDatabase')
36 print(
"--->sections:", td.config.sections())
37 assert td.config.sections()
is not None
38 sections = [
'*IUDatabase']
39 print(
"--->to skip:", sections)
40 expsections = td.expandWildCards(sections)
41 assert 'Reporter:IUDatabase' in expsections
42 print(
"--->expanded:", expsections)
46 td.config.add_section(
'Reporter:IUDatabase')
47 print(
"--->sections:", td.config.sections())
48 assert td.config.sections()
is not None
49 sections = [
'Report*UDatabase']
50 print(
"--->to skip:", sections)
51 expsections = td.expandWildCards(sections)
52 assert 'Reporter:IUDatabase' in expsections
53 print(
"--->expanded:", expsections)
57 td.config.add_section(
'Reporter:IUDatabase')
58 td.config.add_section(
'Reporter:TextFile')
59 td.config.add_section(
'Reporter:JSONFile')
60 print(
"--->sections:", td.config.sections())
61 assert td.config.sections()
is not None
62 sections = [
'Report*UDatabase']
63 print(
"--->to skip:", sections)
64 expsections = td.expandWildCards(sections)
65 assert 'Reporter:IUDatabase' in expsections
66 print(
"--->expanded:", expsections)
70 td.config.add_section(
'Reporter:IUDatabase')
71 td.config.add_section(
'Reporter:TextFile')
72 td.config.add_section(
'Reporter:JSONFile')
73 print(
"--->sections:", td.config.sections())
74 assert td.config.sections()
is not None
75 sections = [
'Report*']
76 print(
"--->to skip:", sections)
77 expsections = td.expandWildCards(sections)
78 assert 'Reporter:IUDatabase' in expsections
and 'Reporter:TextFile' in expsections
and 'Reporter:JSONFile' in expsections
79 print(
"--->expanded:", expsections)
83 td.config.add_section(
'Reporter:XMLFile')
84 td.config.add_section(
'Reporter:TextFile')
85 td.config.add_section(
'Reporter:JSONFile')
86 print(
"--->sections:", td.config.sections())
87 assert td.config.sections()
is not None
89 print(
"--->to skip:", sections)
90 expsections = td.expandWildCards(sections)
91 assert 'Reporter:XMLFile' in expsections
and 'Reporter:TextFile' in expsections
and 'Reporter:JSONFile' in expsections
92 print(
"--->expanded:", expsections)
96 td.config.add_section(
'Reporter:XMLFile')
97 td.config.add_section(
'Reporter:TextFile')
98 td.config.add_section(
'Reporter:JSONFile')
99 print(
"--->sections:", td.config.sections())
100 assert td.config.sections()
is not None
101 sections = [
'Rep*File']
102 print(
"--->to skip:", sections)
103 expsections = td.expandWildCards(sections)
104 assert 'Reporter:XMLFile' in expsections
and 'Reporter:TextFile' in expsections
and 'Reporter:JSONFile' in expsections
105 print(
"--->expanded:", expsections)
109 td.config.add_section(
'Reporter:XMLFile')
110 td.config.add_section(
'Reporter:TextFile')
111 td.config.add_section(
'Reporter:JSONFile')
112 print(
"--->sections:", td.config.sections())
113 assert td.config.sections()
is not None
114 sections = [
'*porter*File']
115 print(
"--->to skip:", sections)
116 expsections = td.expandWildCards(sections)
117 assert 'Reporter:XMLFile' in expsections
and 'Reporter:TextFile' in expsections
and 'Reporter:JSONFile' in expsections
118 print(
"--->expanded:", expsections)
122 td.config.add_section(
'Reporter:XMLFile')
123 td.config.add_section(
'Reporter:TextFile')
124 td.config.add_section(
'Reporter:JSONFile')
125 print(
"--->sections:", td.config.sections())
126 assert td.config.sections()
is not None
127 sections = [
'*Reporter:TextFile']
128 print(
"--->to skip:", sections)
129 expsections = td.expandWildCards(sections)
130 assert 'Reporter:TextFile' in expsections
131 print(
"--->expanded:", expsections)
135 td.config.add_section(
'Reporter:XMLFile')
136 td.config.add_section(
'Reporter:TextFile')
137 td.config.add_section(
'Reporter:JSONFile')
138 print(
"--->sections:", td.config.sections())
139 assert td.config.sections()
is not None
140 sections = [
'Reporter:TextFile*']
141 print(
"--->to skip:", sections)
142 expsections = td.expandWildCards(sections)
143 assert 'Reporter:TextFile' in expsections
144 print(
"--->expanded:", expsections)
160 td.config.add_section(
'Reporter:TextFile')
161 print(
"--->sections:", td.config.sections())
162 assert td.config.sections()
is not None
163 sections = [
'Report*:*ex*File']
164 print(
"--->to skip:", sections)
165 expsections = td.expandWildCards(sections)
166 assert 'Reporter:TextFile' in expsections
167 print(
"--->expanded:", expsections)
171 td.config.add_section(
'Reporter:TextFile')
172 print(
"--->sections:", td.config.sections())
173 assert td.config.sections()
is not None
174 sections = [
'Reporter*:*Text*File']
175 print(
"--->to skip:", sections)
176 expsections = td.expandWildCards(sections)
177 assert 'Reporter:TextFile' in expsections
178 print(
"--->expanded:", expsections)
def test_expandWildCardsAtBeginningMultiple
def test_expandWildCardsAtEndMultiple
def test_expandWildCardsInMiddleMultiple
def test_expandWildCardsMultipleStarsInARowNoGaps
def test_expandWildCardsMultipleStarsInARow
def test_expandWildCardsMultipleStars
def test_expandWildCardsAtEnd
def test_expandWildCardsInMiddle
def test_expandWildCardsStarsAtEnd
def test_expandWildCardsAtBeginning
def test_expandWildCardsInBigList
def test_expandWildCardsStarsAtBeginning