@@ -41,7 +41,6 @@ def parse_test_cases(parent: 'DataSuiteCollector', suite: 'DataSuite',
41
41
join = os .path .join
42
42
else :
43
43
join = posixpath .join # type: ignore
44
- include_path = os .path .dirname (path )
45
44
with open (path , encoding = 'utf-8' ) as f :
46
45
lst = f .readlines ()
47
46
for i in range (len (lst )):
@@ -166,7 +165,7 @@ def parse_test_cases(parent: 'DataSuiteCollector', suite: 'DataSuite',
166
165
ok = True
167
166
168
167
if ok :
169
- input = expand_includes ( p [i0 ].data , include_path )
168
+ input = p [i0 ].data
170
169
expand_errors (input , tcout , 'main' )
171
170
for file_path , contents in files :
172
171
expand_errors (contents .split ('\n ' ), tcout , file_path )
@@ -505,24 +504,6 @@ def collapse_line_continuation(l: List[str]) -> List[str]:
505
504
return r
506
505
507
506
508
- def expand_includes (a : List [str ], base_path : str ) -> List [str ]:
509
- """Expand @includes within a list of lines.
510
-
511
- Replace all lies starting with @include with the contents of the
512
- file name following the prefix. Look for the files in base_path.
513
- """
514
-
515
- res = [] # type: List[str]
516
- for s in a :
517
- if s .startswith ('@include ' ):
518
- fn = s .split (' ' , 1 )[1 ].strip ()
519
- with open (os .path .join (base_path , fn )) as f :
520
- res .extend (f .readlines ())
521
- else :
522
- res .append (s )
523
- return res
524
-
525
-
526
507
def expand_variables (s : str ) -> str :
527
508
return s .replace ('<ROOT>' , root_dir )
528
509
0 commit comments