We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 962186f commit e58b337Copy full SHA for e58b337
nibabel/cifti2/tests/test_caretspec.py
@@ -1,8 +1,12 @@
1
from pathlib import Path
2
+import unittest
3
4
from nibabel.cifti2.caretspec import *
5
6
from nibabel.testing import data_path
7
+from nibabel.optpkg import optional_package
8
+
9
+requests, has_requests, _ = optional_package('requests')
10
11
12
def test_CaretSpecFile():
@@ -16,3 +20,16 @@ def test_CaretSpecFile():
16
20
assert isinstance(df, CaretSpecDataFile)
17
21
if df.data_file_type == 'SURFACE':
18
22
assert isinstance(df, SurfaceDataFile)
23
24
25
+@unittest.skipUnless(has_requests, reason="Test fetches from URL")
26
+def test_SurfaceDataFile():
27
+ fsLR = CaretSpecFile.from_filename(Path(data_path) / "fsLR.wb.spec")
28
+ df = fsLR.data_files[0]
29
+ assert df.data_file_type == 'SURFACE'
30
+ try:
31
+ coords, triangles = df.get_mesh()
32
+ except IOError:
33
+ raise unittest.SkipTest(reason="Broken URL")
34
+ assert coords.shape == (32492, 3)
35
+ assert triangles.shape == (64980, 3)
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments