[Darshan-commits] [Git][darshan/darshan][master] 2 commits: TST: add test for unsupported rec

Shane Snyder xgitlab at cels.anl.gov
Tue May 11 14:54:48 CDT 2021



Shane Snyder pushed to branch master at darshan / darshan


Commits:
caf1c297 by Tyler Reddy at 2021-04-15T15:56:53-06:00
TST: add test for unsupported rec

* add a test case that verifies that an appropriate
`logger` warning is produced for unsupported records
fed to the `mod_read_all_records()` method
of `DarshanReport`

* the warning code is not currently covered by tests
on `master`

- - - - -
8049f2f9 by Shane Snyder at 2021-05-11T14:54:45-05:00
Merge branch 'treddy_unsupported_record_warn_test' into 'master'

TST: add test for unsupported rec

See merge request darshan/darshan!97
- - - - -


1 changed file:

- darshan-util/pydarshan/tests/test_report.py


Changes:

=====================================
darshan-util/pydarshan/tests/test_report.py
=====================================
@@ -46,6 +46,19 @@ def test_load_records():
     assert 1 == len(report.data['records']['POSIX'])
 
 
+ at pytest.mark.parametrize("unsupported_record",
+        ["DXT_POSIX", "DXT_MPIIO", "LUSTRE"]
+        )
+def test_unsupported_record_load(caplog, unsupported_record):
+    # check for appropriate logger warning when attempting to
+    # load unsupported record
+    report = darshan.DarshanReport("tests/input/sample.darshan")
+    report.mod_read_all_records(mod=unsupported_record)
+    for record in caplog.records:
+        assert 'Currently unsupported' in record.message
+        assert unsupported_record in record.message
+
+
 def test_internal_references():
     """
     Test if the reference ids match. This tests mainly serves to make



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/8fc5cb2c57c8a5e4c0e0d613743956c93c81bea6...8049f2f9a2de5e1165a765e888e10ecc8a63643a

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/8fc5cb2c57c8a5e4c0e0d613743956c93c81bea6...8049f2f9a2de5e1165a765e888e10ecc8a63643a
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/7a6bb916/attachment-0001.html>


More information about the Darshan-commits mailing list