Skip to content

Commit a74ae47

Browse files
committed
test: Relax test to allow non-100% capture
1 parent b4d1f56 commit a74ae47

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

templateflow/tests/test_cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import re
12
from pathlib import Path
23

34
import click.testing
@@ -46,7 +47,7 @@ def test_get_one():
4647
# One result, possible download status before
4748
lines = result.output.strip().splitlines()[-2:]
4849
if len(lines) == 2:
49-
assert lines[0].startswith('100%')
50+
assert re.match(r' *\d+%', lines[0])
5051
lines.pop(0)
5152

5253
assert 'tpl-MNI152Lin/tpl-MNI152Lin_res-01_T1w.nii.gz' in lines[0]
@@ -65,7 +66,7 @@ def test_get_multi():
6566
# Two result, possible download status before
6667
lines = result.output.strip().splitlines()[-3:]
6768
if len(lines) == 3:
68-
assert lines[0].startswith('100%')
69+
assert re.match(r' *\d+%', lines[0])
6970
lines.pop(0)
7071

7172
assert 'tpl-MNI152Lin/tpl-MNI152Lin_res-01_T1w.nii.gz' in lines[0]

0 commit comments

Comments
 (0)