Example #1
0
 def test_spawned_process_timeout_nostderr(self):
     exc_args = ('foo bar', 'partial output', '', 10)
     e = exc.SpawnedProcessTimeout(*exc_args)
     self.assertRaisesRegex(
         exc.ReframeError, r"command 'foo bar' timed out after 10s:\n"
         r"=== STDOUT ===\n"
         r'partial output\n'
         r"=== STDERR ===", raise_exc, e)
Example #2
0
 def test_spawned_process_timeout_nostderr(self):
     exc_args = ('foo bar', 'partial output', '', 10)
     e = exc.SpawnedProcessTimeout(*exc_args)
     with pytest.raises(exc.ReframeError,
                        match=r"command 'foo bar' timed out after 10s:\n"
                        r"=== STDOUT ===\n"
                        r'partial output\n'
                        r"=== STDERR ==="):
         raise_exc(e)
Example #3
0
def test_spawned_process_timeout_nostdout():
    exc_args = ('foo bar', '', 'partial error', 10)
    e = exc.SpawnedProcessTimeout(*exc_args)
    with pytest.raises(exc.ReframeError,
                       match=(r"command 'foo bar' timed out after 10s:\n"
                              r"=== STDOUT ===\n"
                              r"=== STDERR ===\n"
                              r"partial error")):
        raise e
Example #4
0
def test_spawned_process_timeout_nostderr():
    exc_args = ('foo bar', 'partial output', '', 10)
    e = exc.SpawnedProcessTimeout(*exc_args)
    with pytest.raises(exc.ReframeError,
                       match=(r"command 'foo bar' timed out after 10s:\n"
                              r"--- stdout ---\n"
                              r'partial output\n'
                              r"--- stdout ---\n"
                              r"--- stderr ---\n"
                              r"--- stderr ---")):
        raise e