[Darshan-commits] [Git][darshan/darshan][dev-better-error-handling] a test for the "cannot open file" case

Rob Latham xgitlab at cels.anl.gov
Tue Mar 30 10:27:10 CDT 2021



Rob Latham pushed to branch dev-better-error-handling at darshan / darshan


Commits:
71b300ff by Rob Latham at 2021-03-30T10:26:40-05:00
a test for the "cannot open file" case

- - - - -


1 changed file:

- + darshan-util/pydarshan/tests/test_error.py


Changes:

=====================================
darshan-util/pydarshan/tests/test_error.py
=====================================
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""Tests for `pydarshan` package."""
+
+import pytest
+
+import darshan.backend.cffi_backend as backend
+
+
+ at pytest.fixture
+def response():
+    """Sample pytest fixture.
+
+    See more at: http://doc.pytest.org/en/latest/fixture.html
+    """
+    pass
+
+
+def test_cannotopen():
+    """Ensure we do not dump core on error."""
+
+    log = backend.log_open("fake/tooth-fairy.darshan")
+
+    rec = backend.log_get_record(log, "MPI-IO")
+    assert rec['counters'][1] == 2048
+
+
+def test_ishouldrun():
+    assert 1



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/commit/71b300ffcfed440dd2f55164e8a321c47722efeb

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/commit/71b300ffcfed440dd2f55164e8a321c47722efeb
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/20210330/119fca35/attachment-0001.html>


More information about the Darshan-commits mailing list