Commit 147c469e authored by Shane Snyder's avatar Shane Snyder
Browse files

Merge branch 'treddy_test_darshanreport_info' into 'master'

TST: add test for info() method

See merge request !98
parents 31bdb610 634c50e9
......@@ -70,3 +70,26 @@ def test_internal_references():
# check the convienience refs are working fine
check = id(report.records) == id(report.data['records'])
assert check is True
def test_info_contents(capsys):
# regression guard for the output from the info()
# method of DarshanReport
report = darshan.DarshanReport("tests/input/sample.darshan")
report.info()
captured = capsys.readouterr()
expected_keys = ['Times',
'Executeable',
'Processes',
'JobID',
'UID',
'Modules in Log',
'Loaded Records',
'Name Records',
'Darshan/Hints',
'DarshanReport']
expected_values = ['2048', '4478544', '69615']
expected_strings = expected_keys + expected_values
for expected_string in expected_strings:
assert expected_string in captured.out
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment