Commit 18d1054a authored by Shane Snyder's avatar Shane Snyder
Browse files

Merge branch 'treddy/darshan-treddy_test_invalid_darshanreport_file_open' into HEAD

parents 65f4ed71 7b764116
...@@ -93,3 +93,19 @@ def test_info_contents(capsys): ...@@ -93,3 +93,19 @@ def test_info_contents(capsys):
for expected_string in expected_strings: for expected_string in expected_strings:
assert expected_string in captured.out assert expected_string in captured.out
@pytest.mark.parametrize("invalid_filepath", [
# messy path that does not exist
'#!$%',
# path that exists but has no
# actual log file
'.',
]
)
def test_report_invalid_file(invalid_filepath):
# verify appropriate error handling for
# provision of an invalid file path to
# DarshanReport
with pytest.raises(RuntimeError, match='Failed to open file'):
darshan.DarshanReport(invalid_filepath)
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