Changeset 81cd2a2 in sasmodels


Ignore:
Timestamp:
Apr 19, 2016 5:13:59 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:
e1454ab, abdd01c
Parents:
3434240
Message:

fix test runner patch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/model_test.py

    r3434240 r81cd2a2  
    235235    """ 
    236236    try: 
    237         import xmlrunner 
    238         runner = xmlrunner.XMLTestRunner(output='logs', verbosity=verbosity) 
    239     except: 
    240         runner = unittest.TextTestRunner() 
     237        from xmlrunner import XMLTestRunner as TestRunner 
     238        test_args = { 'output': 'logs' } 
     239    except ImportError: 
     240        from unittest import TextTestRunner as TestRunner 
     241        test_args = { } 
    241242 
    242243    models = sys.argv[1:] 
     
    277278        return 1 
    278279 
     280    runner = TestRunner(verbosity=verbosity, **test_args) 
    279281    result = runner.run(make_suite(loaders, models)) 
    280282    return 1 if result.failures or result.errors else 0 
Note: See TracChangeset for help on using the changeset viewer.