Changeset 3434240 in sasmodels


Ignore:
Timestamp:
Apr 19, 2016 7:07:30 PM (9 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:
81cd2a2
Parents:
f36c1b7
Message:

use unittest test runner if xmlrunner is not available

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/model_test.py

    r82923a6 r3434240  
    234234    Returns 0 if success or 1 if any tests fail. 
    235235    """ 
    236     import xmlrunner 
     236    try: 
     237        import xmlrunner 
     238        runner = xmlrunner.XMLTestRunner(output='logs', verbosity=verbosity) 
     239    except: 
     240        runner = unittest.TextTestRunner() 
    237241 
    238242    models = sys.argv[1:] 
     
    273277        return 1 
    274278 
    275     #runner = unittest.TextTestRunner() 
    276     runner = xmlrunner.XMLTestRunner(output='logs', verbosity=verbosity) 
    277279    result = runner.run(make_suite(loaders, models)) 
    278280    return 1 if result.failures or result.errors else 0 
Note: See TracChangeset for help on using the changeset viewer.