Changeset 13649


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

#5819 Updated test with platform specific message since apparently the error message thrown from java is different on linux and windows.

File:
1 edited

Legend:

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

    r13648 r13649  
    485485        model_name = 'BouncingBall'
    486486        file_name = "NonExistantFile"
     487        if sys.platform == 'linux':
     488            platform_specific_msg = "No such file or directory"
     489        else:
     490            platform_specific_msg = "The system cannot find the file specified"
    487491        try:
    488492            compile_fmu(model_name, file_name = file_name)
    489493        except OSError as e:
    490             expected_msg = 'NonExistantFile (The system cannot find the file specified)'
     494            expected_msg = 'NonExistantFile ({})'.format(platform_specific_msg)
    491495            err_msg = "EXPECTED: OSError: {}\nRECEIVED: {}: {}\n".format(expected_msg, type(e).__name__, str(e))
    492496            assert str(e) == expected_msg, err_msg
Note: See TracChangeset for help on using the changeset viewer.