Commit 550f3a65 authored by Tyler Reddy's avatar Tyler Reddy
Browse files

TST: add test for to_json() method

* add a regression test for the `to_json()` method
of the `DarshanReport` class, which was previously
uncovered by tests
parent 141e2fa6
......@@ -57,3 +57,27 @@ def test_internal_references():
# check the convienience refs are working fine
check = id(report.records) == id(['records'])
assert check is True
def test_json_fidelity():
# regression test for provision of appropriate
# data by to_json() method of DarshanReport class
report = darshan.DarshanReport("tests/input/sample.darshan")
actual_json = report.to_json()
for expected_key in ["version",
assert expected_key in actual_json
for expected_value in ['69615',
assert expected_value in actual_json
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