Skip to content

Commit a72c049

Browse files
committed
Fix condition that was missing after #26
This is especially usefull when a version line is contained inside a yaml block Signed-off-by: Frederic Martinsons <[email protected]>
1 parent 86f356c commit a72c049

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tap2junit/tap13.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,12 @@ def _parse(self, source):
107107
self.__tests_counter = 0
108108

109109
for line in source:
110-
if not version12 and not seek_version and RE_VERSION.match(line):
110+
if (
111+
not version12
112+
and not seek_version
113+
and not in_yaml
114+
and RE_VERSION.match(line)
115+
):
111116
# refack: breaking TAP13 spec, to allow multiple TAP headers
112117
seek_version = True
113118
seek_plan = False

0 commit comments

Comments
 (0)