Commit 681bae42 authored by Mikaël Salson's avatar Mikaël Salson
Browse files

should-vdj-to-tap: The test succeeds only if UNSEG doesn't follow the searched pattern.

This doesn't prevent from testing unsegmented sequences
as the output is not UNSEG UNSEG (UNSEG will appear only once).
parent 2ea249e0
......@@ -64,6 +64,8 @@ def id_line_to_tap(l, tap_id):
'''
Parses lines such as:
>TRDD2*01_1/AGG/1_TRDD3*01__TRD+ + VJ 0 84 88 187 TRDD2*01 1/AGG/1 TRDD3*01 TRD+
or
>TRDV3*01_0//0_TRDJ4*01 ! + VJ 0 49 50 97 TRD UNSEG noisy
and return a .tap line
'''
......@@ -83,14 +85,16 @@ def id_line_to_tap(l, tap_id):
return ''
tap = ''
should_not_found = (not should_pattern in result) \
or (should_pattern + ' UNSEG' in result)
if not should_pattern in result:
if should_not_found:
globals()['global_failed'] = True
tap += 'not '
tap += 'ok %d - %s' % (tap_id, should_pattern)
if not should_pattern in result:
if should_not_found:
tap += ' - found instead ' + result
return tap
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment