1717# CIL Developers, listed at: https://github.com/TomographicImaging/CIL/blob/master/NOTICE.txt
1818
1919import unittest
20- from utils import initialise_tests
20+ from utils import initialise_tests , has_zenodo_get
2121from cil .framework import ImageGeometry , AcquisitionGeometry
2222from cil .utilities import dataexample
2323from cil .utilities import noise
2424import os , sys , shutil
2525from testclass import CCPiTestClass
2626import platform
2727import numpy as np
28- from unittest .mock import patch
28+ from unittest .mock import patch
2929from zipfile import ZipFile
3030from io import StringIO
3131import uuid
32- from zenodo_get import zenodo_get
3332
3433initialise_tests ()
3534
@@ -168,7 +167,8 @@ def mock_zenodo_get(*args):
168167
169168
170169 @patch ('cil.utilities.dataexample.input' , return_value = 'y' )
171- @patch ('cil.utilities.dataexample.zenodo_get' , side_effect = mock_zenodo_get )
170+ @patch ('zenodo_get.zenodo_get' , side_effect = mock_zenodo_get )
171+ @unittest .skipUnless (has_zenodo_get , "zenodo_get not installed" )
172172 def test_download_data_input_y (self , mock_zenodo_get , input ):
173173 '''
174174 Test the download_data function, when the user input is 'y' to 'are you sure you want to download data'
@@ -196,7 +196,7 @@ def test_download_data_input_y(self, mock_zenodo_get, input):
196196
197197
198198 @patch ('cil.utilities.dataexample.input' , return_value = 'n' )
199- @patch ('cil.utilities.dataexample. zenodo_get' , side_effect = mock_zenodo_get )
199+ @patch ('zenodo_get. zenodo_get' , side_effect = mock_zenodo_get )
200200 def test_download_data_input_n (self , mock_zenodo_get , input ):
201201 '''
202202 Test the download_data function, when the user input is 'n' to 'are you sure you want to download data'
@@ -239,7 +239,4 @@ def test_download_data_empty(self, input):
239239
240240 with self .assertRaises (ValueError ):
241241 remote_data .download_data ('.' )
242-
243- def test_a (self ):
244- from cil .utilities .dataexample import WALNUT
245242
0 commit comments