Allow new line characters in test results
This commit is contained in:
@ -453,13 +453,13 @@ configureEditors: function () {
|
|||||||
ul.setAttribute('class', 'error_messages_list');
|
ul.setAttribute('class', 'error_messages_list');
|
||||||
errorMessagesToShow.forEach(function (item) {
|
errorMessagesToShow.forEach(function (item) {
|
||||||
var li = document.createElement("li");
|
var li = document.createElement("li");
|
||||||
var text = document.createTextNode(item);
|
var text = $.parseHTML(item);
|
||||||
li.appendChild(text);
|
$(li).append(text);
|
||||||
ul.append(li);
|
ul.append(li);
|
||||||
})
|
})
|
||||||
targetNode.append(ul);
|
targetNode.append(ul);
|
||||||
} else {
|
} else {
|
||||||
targetNode.text(errorMessagesToShow.join(''));
|
targetNode.html(errorMessagesToShow.join(''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//card.find('.row .col-sm-9').eq(4).find('a').attr('href', '#output-' + index);
|
//card.find('.row .col-sm-9').eq(4).find('a').attr('href', '#output-' + index);
|
||||||
|
@ -3,7 +3,7 @@ class PyUnitAdapter < TestingFrameworkAdapter
|
|||||||
FAILURES_REGEXP = /FAILED \(.*failures=(\d+).*\)/
|
FAILURES_REGEXP = /FAILED \(.*failures=(\d+).*\)/
|
||||||
ERRORS_REGEXP = /FAILED \(.*errors=(\d+).*\)/
|
ERRORS_REGEXP = /FAILED \(.*errors=(\d+).*\)/
|
||||||
# The regex below also catches new line separators.
|
# The regex below also catches new line separators.
|
||||||
ASSERTION_ERROR_REGEXP = /AssertionError:\s(.*)\s\s----------------------------------------------------------------------/m
|
ASSERTION_ERROR_REGEXP = /AssertionError:\s(.*?)\s\s----------------------------------------------------------------------/m
|
||||||
|
|
||||||
def self.framework_name
|
def self.framework_name
|
||||||
'PyUnit'
|
'PyUnit'
|
||||||
@ -15,7 +15,7 @@ class PyUnitAdapter < TestingFrameworkAdapter
|
|||||||
failed = failures_matches ? failures_matches.captures.try(:first).to_i : 0
|
failed = failures_matches ? failures_matches.captures.try(:first).to_i : 0
|
||||||
error_matches = ERRORS_REGEXP.match(output[:stderr])
|
error_matches = ERRORS_REGEXP.match(output[:stderr])
|
||||||
errors = error_matches ? error_matches.captures.try(:first).to_i : 0
|
errors = error_matches ? error_matches.captures.try(:first).to_i : 0
|
||||||
assertion_error_matches = ASSERTION_ERROR_REGEXP.match(output[:stderr]).try(:captures) || []
|
assertion_error_matches = output[:stderr].scan(ASSERTION_ERROR_REGEXP).flatten || []
|
||||||
{count: count, failed: failed + errors, error_messages: assertion_error_matches}
|
{count: count, failed: failed + errors, error_messages: assertion_error_matches}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user