Changeset 13648


Ignore:
Timestamp:
Oct 3, 2019 7:26:53 AM (2 months ago)
Author:
randersson
Message:

#5819 Added type() around exception in test in order to get the correct error message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-5819/Python/src/tests_jmodelica/test_compiler.py

    r13643 r13648  
    489489        except OSError as e:
    490490            expected_msg = 'NonExistantFile (The system cannot find the file specified)'
    491             err_msg = "EXPECTED: OSError: {}\nRECEIVED: {}: {}\n".format(expected_msg, e.__name__, str(e))
     491            err_msg = "EXPECTED: OSError: {}\nRECEIVED: {}: {}\n".format(expected_msg, type(e).__name__, str(e))
    492492            assert str(e) == expected_msg, err_msg
    493493   
Note: See TracChangeset for help on using the changeset viewer.