File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 55
66from  numba  import  config 
77import  numba .testing 
8- from  dppy .ocldrv  import  * 
9- from  .device_init  import  * 
8+ 
9+ from  numba .dppy_config  import  * 
10+ if  dppy_present :
11+     from  .device_init  import  * 
12+ else :
13+     raise  ImportError ("Importing dppy failed" )
1014
1115def  test (* args , ** kwargs ):
12-     if  not  is_available ():
16+     if  dppy_present   and   not  is_available ():
1317        dppy_error ()
1418
1519    return  numba .testing .test ("numba.dppy.tests" , * args , ** kwargs )
Original file line number Diff line number Diff line change 11from  numba .testing  import  SerialSuite 
22from  numba .testing  import  load_testsuite 
33from  os .path  import  dirname , join 
4- import  dppy .ocldrv  as  ocldrv 
4+ 
5+ 
6+ import  numba .dppy_config  as  dppy_config 
57
68def  load_tests (loader , tests , pattern ):
79
810    suite  =  SerialSuite ()
911    this_dir  =  dirname (__file__ )
1012
11-     if  ocldrv .is_available ():
13+     if  dppy_config . dppy_present   and   dppy_config .is_available ():
1214        suite .addTests (load_testsuite (loader , join (this_dir , 'dppy' )))
1315    else :
1416        print ("skipped DPPY tests" )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments