예제 #1
0
 def test_load_allowed_recon_args_with_cuda(self):
     allowed_args = tomopy_allowed_kwargs()
     allowed_args.update(astra_allowed_kwargs())
     allowed_args.update(cil_allowed_kwargs())
     with mock.patch(
             "mantidimaging.gui.windows.recon.model.CudaChecker.cuda_is_present",
             return_value=True):
         assert self.model.load_allowed_recon_kwargs() == allowed_args
예제 #2
0
 def load_allowed_recon_kwargs():
     d = tomopy_allowed_kwargs()
     if CudaChecker().cuda_is_present():
         d.update(astra_allowed_kwargs())
         d.update(cil_allowed_kwargs())
     return d
예제 #3
0
 def test_load_allowed_recon_args_no_cuda(self):
     with mock.patch(
             "mantidimaging.gui.windows.recon.model.CudaChecker.cuda_is_present",
             return_value=False):
         assert self.model.load_allowed_recon_kwargs(
         ) == tomopy_allowed_kwargs()
예제 #4
0
 def load_allowed_recon_kwargs():
     d = tomopy_allowed_kwargs()
     d.update(astra_allowed_kwargs())
     return d