Skip to content

Commit f6fd450

Browse files
committed
first version of stdout capture improvement
1 parent ba6a1c0 commit f6fd450

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codeflash/verification/parse_test_output.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def parse_func(file_path: Path) -> XMLParser:
3737

3838

3939
matches_re = re.compile(r"!######(.*?):(.*?)([^\.:]*?):(.*?):(.*?):(.*?)######!")
40-
cleaner_re = re.compile(r"!######.*?######!|-+\s*Captured\s+(Log|Out)\s*-+\n?")
40+
stdout_re = re.compile(r"!######.*?######!\n(.*)!\$######.*?######\$!", re.DOTALL)
4141

4242

4343
def parse_test_return_values_bin(file_location: Path, test_files: TestFiles, test_config: TestConfig) -> TestResults:
@@ -268,7 +268,7 @@ def parse_test_xml(
268268
matches = matches_re.findall(sys_stdout)
269269

270270
if sys_stdout:
271-
sys_stdout = cleaner_re.sub("", sys_stdout).strip()
271+
sys_stdout = stdout_re.search(sys_stdout).group(1)
272272

273273
if not matches or not len(matches):
274274
test_results.add(

0 commit comments

Comments
 (0)