in testinggame/__init__.py [0:0]
def _find_boost_tests(blame_lines, names):
"""
Finds the number of Boost test cases per user.
Args:
blame_lines: An array where each index is a string containing the git
blame line.
names: The current dictionary containing the usernames as a key and the
number of tests as a value.
Returns:
A dictionary built off the names argument containing the usernames as a
key and the number of tests as a value.
"""
test_cases = ['BOOST_AUTO_TEST_CASE', 'BOOST_FIXTURE_TEST_CASE']
for blame_line in blame_lines:
contains_test_case = False
for test_case in test_cases:
contains_test_case |= blame_line.find(test_case) != -1
if contains_test_case:
break
if contains_test_case:
name = _find_name_from_blame(blame_line)
name_count = names.get(name, 0)
names[name] = name_count + 1
return names