Changeset 13839


Ignore:
Timestamp:
Oct 24, 2019 1:20:48 PM (4 weeks ago)
Author:
randersson
Message:

#5819 Replaced e.message with str(e) for Python 3

File:
1 edited

Legend:

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

    r13600 r13839  
    2626
    2727def setString(model, name, value):
     28    value_ref = model.get_variable_valueref(name)
     29    print("Using model.set_string(a, b) where:\na={} of type {}".format(value_ref, type(value_ref)))
     30    print("b={} of type {}".format(value, type(value)))
    2831    model.set_string([model.get_variable_valueref(name)], [value])
    2932   
     
    3336        assert False, "Expected exception"
    3437    except FMUException as e:
    35         assert e.message.startswith("Failed to set the String values."), "Wrong error: '" + e.message + "'"
     38        assert str(e).startswith("Failed to set the String values."), "Wrong error: '" + str(e) + "'"
    3639
    3740class TestStringParameter1(SimulationTest):
Note: See TracChangeset for help on using the changeset viewer.