34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/learn_test/strategies/pytest.rb', line 34
def results
failed_count = output['failures'].to_i + output['errors'].to_i
skipped_count = output['skips'].to_i
passed_count = output['tests'].to_i - failed_count - skipped_count
{
username: username,
github_user_id: user_id,
learn_oauth_token: learn_oauth_token,
repo_name: runner.repo,
build: {
test_suite: [{
framework: 'pytest',
formatted_output: output.to_json,
duration: output['time']
}]
},
examples: output['tests'].to_i,
passing_count: passed_count,
pending_count: skipped_count,
failure_count: failed_count,
failure_descriptions: concat_failure_descriptions
}
end
|