diff --git a/lib/py_lint_adapter.rb b/lib/py_lint_adapter.rb index 4be814c1..57c58a3d 100644 --- a/lib/py_lint_adapter.rb +++ b/lib/py_lint_adapter.rb @@ -12,8 +12,8 @@ class PyLintAdapter < TestingFrameworkAdapter passed = captures.first failed = count - passed begin - Timeout.timeout(2.seconds) do - assertion_error_matches = output[:stdout].scan(ASSERTION_ERROR_REGEXP).map { |match| + assertion_error_matches = Timeout.timeout(2.seconds) do + output[:stdout].scan(ASSERTION_ERROR_REGEXP).map { |match| test = match.first.strip description = match.second.strip "#{test}: #{description}" diff --git a/lib/py_unit_adapter.rb b/lib/py_unit_adapter.rb index 5c30dd3d..25c2fb07 100644 --- a/lib/py_unit_adapter.rb +++ b/lib/py_unit_adapter.rb @@ -15,8 +15,8 @@ class PyUnitAdapter < TestingFrameworkAdapter error_matches = ERRORS_REGEXP.match(output[:stderr]) errors = error_matches ? error_matches.captures.try(:first).to_i : 0 begin - Timeout.timeout(2.seconds) do - assertion_error_matches = output[:stderr].scan(ASSERTION_ERROR_REGEXP).map { |match| + assertion_error_matches = Timeout.timeout(2.seconds) do + output[:stderr].scan(ASSERTION_ERROR_REGEXP).map { |match| testname = match[1] error = match[3].strip