Skip to content

Commit c33b9f7

Browse files
committed
fix: update test after fsaverage has now a reference
1 parent ecf937a commit c33b9f7

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

templateflow/tests/test_api.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,26 @@
6565
"https://github.com/Washington-University/HCPpipelines/tree/master/global/templates"
6666
)
6767

68+
fsaverage_fbib = """\
69+
@article{Fischl_1999,
70+
\tdoi = {10.1002/(sici)1097-0193(1999)8:4<272::aid-hbm10>3.0.co;2-4},
71+
\turl = {https://doi.org/10.1002%2F%28sici%291097-0193%281999%298%3A4%3C272%3A%3Aaid-hbm10%3E3.0.co%3B2-4},
72+
\tyear = 1999,
73+
\tpublisher = {Wiley},
74+
\tvolume = {8},
75+
\tnumber = {4},
76+
\tpages = {272--284},
77+
\tauthor = {Bruce Fischl and Martin I. Sereno and Roger B.H. Tootell and Anders M. Dale},
78+
\ttitle = {High-resolution intersubject averaging and a coordinate system for the cortical surface},
79+
\tjournal = {Human Brain Mapping}
80+
}"""
6881

6982
@pytest.mark.parametrize(
7083
"template,urls,fbib,lbib",
7184
[
7285
("MNI152NLin2009cAsym", mni2009_urls, mni2009_fbib, mni2009_lbib),
7386
("fsLR", fslr_urls, fslr_fbib, fslr_lbib),
74-
("fsaverage", [], None, None),
87+
("fsaverage", ["https://doi.org/10.1002/(sici)1097-0193(1999)8:4%3C272::aid-hbm10%3E3.0.co;2-4"], fsaverage_fbib, None),
7588
],
7689
)
7790
def test_citations(tmp_path, template, urls, fbib, lbib):
@@ -80,7 +93,7 @@ def test_citations(tmp_path, template, urls, fbib, lbib):
8093
bibs = api.get_citations(template, bibtex=True)
8194
if bibs:
8295
assert "".join(bibs[0]) == fbib
83-
assert "".join(bibs[-1]) == lbib
96+
assert len(bibs) == 1 if lbib is None else "".join(bibs[-1]) == lbib
8497
else:
8598
# no citations currently
86-
assert template == "fsaverage"
99+
assert False

0 commit comments

Comments
 (0)