def test_whole(self):
"""Is the entire output as expected?"""
with patch('sys.stdout', new=StringIO()) as fake_out:
self.my_log.describe()
out = fake_out.getvalue()
self.assertRegex(out, "Log containing 4 records from local git created at ....-..-.. ..:..:..\.......\.\n"
"Origin: .*\n"
"Number of authors: 4\n"
"Number of files: 7\n"
"Most common email address domains:\n"
"\t @gmail.com \[4 users\]\n"
"Date range: 2016-05-20 09:19:20-04:00 to 2016-05-26 11:21:03-04:00\n"
"Change distribution summary:\n"
"\t Files changed: Mean = 2.75, SD = 0.829\n"
"\t Line insertions: Mean = 2.75, SD = 0.829\n"
"\t Line deletions: Mean = nan, SD = nan\n"
"Number of merges: 0\n"
"Number of parsing errors: 0\n")
评论列表
文章目录