Changeset 9404dd3 in sasmodels for sasmodels/model_test.py


Ignore:
Timestamp:
Dec 4, 2015 12:41:47 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
eaca9eb
Parents:
7bb290c
Message:

python 3.x support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/model_test.py

    r2781b2e r9404dd3  
    6868        model_definition = load_model_definition(model_name) 
    6969 
    70         #print '------' 
    71         #print 'found tests in', model_name 
    72         #print '------' 
     70        #print('------') 
     71        #print('found tests in', model_name) 
     72        #print('------') 
    7373 
    7474        # if ispy then use the dll loader to call pykernel 
     
    9393                                     test_method_name, 
    9494                                     platform="ocl", dtype='single') 
    95                 #print "defining", test_name 
     95                #print("defining", test_name) 
    9696                suite.addTest(test) 
    9797 
     
    144144                    pass 
    145145 
    146             except Exception,exc: 
     146            except Exception as exc: 
    147147                annotate_exception(exc, self.test_name) 
    148148                raise 
     
    201201    if models and models[0] == 'opencl': 
    202202        if not HAVE_OPENCL: 
    203             print >>sys.stderr, "opencl is not available" 
     203            print("opencl is not available") 
    204204            return 1 
    205205        loaders = ['opencl'] 
     
    215215        loaders = ['opencl', 'dll'] 
    216216    if not models: 
    217         print >>sys.stderr, """\ 
     217        print("""\ 
    218218usage: 
    219219  python -m sasmodels.model_test [opencl|dll|opencl_and_dll] model1 model2 ... 
     
    221221If model1 is 'all', then all except the remaining models will be tested. 
    222222If no compute target is specified, then models will be tested with both opencl 
    223 and dll; the compute target is ignored for pure python models.""" 
     223and dll; the compute target is ignored for pure python models.""") 
    224224 
    225225        return 1 
Note: See TracChangeset for help on using the changeset viewer.