[Darshan-commits] [Git][darshan/darshan][master] 2 commits: TST: add test for info() method
Shane Snyder
xgitlab at cels.anl.gov
Tue May 11 15:00:44 CDT 2021
Shane Snyder pushed to branch master at darshan / darshan
Commits:
634c50e9 by Tyler Reddy at 2021-04-15T16:28:47-06:00
TST: add test for info() method
* the `info()` method of the `pydarshan` `DarshanReport` class
is currently completely uncovered by tests in `master`
* add a regression guard for some of the string contents of
the `info()` printout--this method is used pretty commonly,
at least in my experience
- - - - -
147c469e by Shane Snyder at 2021-05-11T15:00:42-05:00
Merge branch 'treddy_test_darshanreport_info' into 'master'
TST: add test for info() method
See merge request darshan/darshan!98
- - - - -
1 changed file:
- darshan-util/pydarshan/tests/test_report.py
Changes:
=====================================
darshan-util/pydarshan/tests/test_report.py
=====================================
@@ -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
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/31bdb610199df912b671835f9202298ed17565a0...147c469e745cd63ead0378831e91dc1084986765
--
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/31bdb610199df912b671835f9202298ed17565a0...147c469e745cd63ead0378831e91dc1084986765
You're receiving this email because of your account on xgitlab.cels.anl.gov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20210511/a547aa42/attachment-0001.html>
More information about the Darshan-commits
mailing list