예제 #1
0
    def test_no_executable(self, mock_copy, mock_check_output):
        mock_copy.side_effect = fx.matlab_copy_effect
        mock_check_output.side_effect = \
            fx.make_matlab_side_effect(recognized = False)

        with self.assertRaises(ExecCallError):
            gs.build_matlab(target='./build/test.mat',
                            source='./input/matlab_test_script.m',
                            env={})
예제 #2
0
 def test_other_os(self, mock_copy, mock_check_output):
     '''
     Test that build_matlab() raises an exception when run on a
     non-Unix, non-Windows operating system.
     '''
     mock_copy.side_effect = fx.matlab_copy_effect
     mock_check_output.side_effect = fx.make_matlab_side_effect(True)
     with self.assertRaises(PrerequisiteError):
         gs.build_matlab(target='./build/test.mat',
                         source='./input/matlab_test_script.m',
                         env={})