示例#1
0
def test_parsing_errors():
    """Test the raising of the appropriate errors"""
    from aiida.schedulers import SchedulerParsingError
    scheduler = LsfScheduler()

    with pytest.raises(SchedulerParsingError) as exc:
        scheduler._parse_submit_output(0, 'Bad-Output-String', '')
    assert '`Bad-Output-String`' in str(exc.value)

    with pytest.raises(ValueError) as exc:
        scheduler._parse_time_string('Bad-Time-String')
    assert '`Bad-Time-String`' in str(exc.value)
示例#2
0
def test_submit_output():
    """Test the parsing of the submit response"""
    scheduler = LsfScheduler()
    retval = 0
    stdout = SUBMIT_STDOUT_TO_TEST
    stderr = ''

    assert scheduler._parse_submit_output(retval, stdout,
                                          stderr) == '764254593'
示例#3
0
    def test_submit_output(self):
        """
        Test the parsing of the output of the submission command
        """
        scheduler = LsfScheduler()
        retval = 0
        stdout = SUBMIT_STDOUT_TO_TEST
        stderr = ''

        self.assertEqual(
            scheduler._parse_submit_output(retval, stdout, stderr),
            '764254593')