Changeset 13642


Ignore:
Timestamp:
Oct 2, 2019 1:59:16 PM (2 months ago)
Author:
randersson
Message:

#5819 Added another test for non existant files.

File:
1 edited

Legend:

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

    r13600 r13642  
    480480        assert 'sources/BouncingBall.c' in includedFiles, 'Source files should be present when copy_source_files_to_fmu is set to true'
    481481
     482    @testattr(stddist_full = True)
     483    def test_exception_at_non_existing_file(self):
     484        """Test that exception is raised when specified file name does not exist"""
     485        model_name = 'BouncingBall'
     486        file_name = "NonExistantFile"
     487        try:
     488            compile_fmu(model_name, file_name = file_name)
     489        except OSError as e:
     490            assert str(e) == 'NonExistantFile (The system cannot find the file specified)'
     491   
    482492    def assert_compiler_option_missing(self, option_name, exception) :
    483493        """
Note: See TracChangeset for help on using the changeset viewer.