Skip to content

Commit

Permalink
FIX test for write/read gii
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdoc committed Jul 20, 2023
1 parent 749ad13 commit 2845730
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cortex/tests/test_formats.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import os
import tempfile

import numpy as np

import cortex
from cortex.formats import read_gii, write_gii

from numpy.testing import assert_array_equal

def test_write_read_gii():
wm, polys = cortex.db.get_surf("S1", "wm", "lh")
# make sure they are int32 or nibabel will complain
wm = wm.astype(np.int32)
polys = wm.astype(np.int32)
with tempfile.TemporaryDirectory() as tmpdir:
fnout = os.path.join(tmpdir, "out.gii")
write_gii(fnout, wm, polys)
Expand Down

0 comments on commit 2845730

Please sign in to comment.